People live near hazards because
Cost of living can be lower to hazards
volcanic soil is very fertile, which makes it good for farming, so farmers often live on volcanic slopes.
eruptions and earthquakes can be infrequent and so do not pose a regular large risk
some people do not understand the risk (lic)
there are many plate boundaries around the world + can be difficult to avoid.
people have learned to accept the risk that are exposed to
tectonically active areas can provide opportunities for generating geothermal energy.