I used to fly fighters for the Air Force.
As other have said, live bombs are designed to be very safe. You’ll notice they didn’t explode.
At every base I ever flew out of, we had a preferred take-off direction when loaded with live bombs. And it was chosen to be away from the houses. Sometimes the winds were strong enough that we couldn’t use the preferred direction and if so, we took of in the non-preferred direction. Oh well.
From there we had routes that minimized the risk by either heading directly out to the edge of the city via the shortest route and beyond, or else a more circuitous route to try to stay over the less densly settled areas. Note those two goals are often contradictory, and one route went right over a very dense but small area. The net effect was to minimize the total number of buildings flown over.
But once the developers build houses off both ends of all the runways, what are we to do?
There is a military / FAA standard on what to build and what not to build near airports and air bases. Google [AICUZ] for more details. It’s only advisory to the local government and the developers through. Accidents are rare enough that most local governments are perfectly willing to get the extra tax dollars from putting inappropriate development right near airports. And developers love the extra profits available from the cheaper land.
The fools that are building a football stadium in PHX right off the end of the runway are Exhibit 1 in stupid and incompatible use.