There are several reasons why composers began using dynamics. One reason was the increasing use of instrumental music in the 18th century. As instrumental music became more popular, composers needed a way to indicate to performers how they wanted their music to be played. Dynamics provided a way to do this, allowing composers to specify the relative loudness or softness of different passages of music.
Another reason for the development of dynamics was the growing complexity of musical textures in the 18th century. As composers began to write more complex pieces of music, they needed a way to indicate how different instruments or groups of instruments should balance each other. Dynamics provided a way to do this, allowing composers to create a more nuanced and expressive sound.
Finally, the development of dynamics was also influenced by the changing tastes of audiences in the 18th century. As audiences became more sophisticated, they began to demand more from their music. They wanted music that was not only technically impressive, but also emotionally expressive. Dynamics provided a way for composers to meet this demand, allowing them to create music that was both beautiful and moving.