Underground or overground the answer to the question you posed ( "Why would you test them near where someone lives?" ) is, from past experience, because we (for various values of 'we') just do.
Actual tests of real weapons (not simulations) underground collapse mountains (North Korea) and affect fault lines, sub surface water flows, etc - these things will likely affect some people in a 200 km radius - and places with no one in that vicinity are hard to come by - generally you move people off their islands, off their land, or simply don't care.
Actual tests of real weapons (not simulations) underground collapse mountains (North Korea) and affect fault lines, sub surface water flows, etc - these things will likely affect some people in a 200 km radius - and places with no one in that vicinity are hard to come by - generally you move people off their islands, off their land, or simply don't care.