Final answer:
Composers wrote dynamic markings to adapt to the improved expressiveness of instruments, the demands of a growing public concert audience from the middle class, and to express the nuanced emotions characteristic of the Romantic era.
Step-by-step explanation:
Composers started writing dynamic markings in their scores due to several reasons. The evolution of musical instruments during the nineteenth century, such as improvements in valves and keys for woodwinds and brass, allowed for more expressive possibilities, prompting composers to indicate these dynamics clearly. The rise of the middle class and the shift towards public concerts demanded a standardized way of communicating these dynamics to performers to ensure consistency across performances. Additionally, as the Romantic era of music emerged, composers like Berlioz, Strauss, and Wagner sought to express more complex and nuanced emotions through their compositions, which required more specific dynamic instructions than were customary in previous eras.