Why do most houses have sloped roofs but commercial buildings have flat roofs?

Houses have roofs design to shed water and snow easily with minimum maintenance over a long period of time.

Commercial buildings have roofs that also shed water, but are designed so that, when possible, to have annoyance equipment (loud, hot,…) placed on the roof if they are not needed within the building itself.