Those are oftentimes safety features designed for cars to survive entering without anything to hit.
And anything near a road (including rail) will be pelted with rocks and dust full of metals and organic compounds. Anything sensitive to those needs some clearance from traffic.