The buildings are mainly not made out of weaker substances, like wood. They used to be made out of wood, but those were too weak and there wasn’t enough supply. The modern buildings are made of concrete and reinforced with iron. Those materials are very resistant to the earthquakes that Iceland has.
Hydroelectric power helps lower the price of electricity, so most Icelanders don’t have to worry much about spending too much money on electricity. The danger of floods breaking dams and destroying towns is a risk the Icelanders take. In this case, the benefit outweighs the risk.
There is a huge market for the tourism of Iceland. It brings in valuable tourist dollars. People visit the many fumerals, geysers, and hot springs on their vacations. These things can be dangerous to be by because of the chance of falling in. This is another thing that helps the Icelanders stay living on this active plate boundary.
The Icelandic society lives on an active plate boundary. Since the 1500’s scientists estimate one third of all the earth’s lava from then to now was “unleashed” there. They have to deal with many dangerous events caused by the boundary. For their society, the pluses from these tectonic events outweigh the risks.