In Napoleonic times, it was called 'shooting into the brown'
Even a musket did not have great accuracy beyond 100 yards but was still deadly when shot into a large formation of troops.
For thousands of years foot soldiers were extremely vulnerable to cavalry attack and needed to form tight formations as a defense, even if it resulted presenting a large target that missiles could hit from long range.
The longbow of medieval times pushed that range out to beyond 200 yards and when the level of training in England developed from such a young age, archers were capable of high draw weights, which resulted in further distances and better penetration of armour.