Its set at 440Hz as compromise. As you mention 18th century composers favourer A lower than 440Hz (Mozart I believe favoured 422Hz, but I cant find a reference for that). In the 19th century music started being performed in bigger venues with different acoustics than previously and instruments that produced a brighter tone tended to sound better. This resulted in a bit of an arms race as various makers of wind instruments produced higher and higher pitched instruments as the higher pitch sounded better (you could possibly put the better in quotation marks there). This led to another problem in that the human voice couldn’t keep up. 440Hz is a compromise between what the composer had wanted but what modern audiences would deem dull and what the voices of most singers could reliably produce without risking damage.
(Well actually it was originally set at 439Hz but the BBC electronic dodaah that would broadcast the tone so everyone could tune their instruments couldn’t reproduce 439Hz as it was a prime number (early electronics what can I say) so they went with 440Hz.)