Some areas do have flat (or at least flatter) roofs, but those tend to be in hotter, drier areas (deserts, etc.). A roof helps keep out the elements, especially rain and snow. A sloped roof sheds rain quickly, and a steeply sloped roof sloughs off heavy snowfall. Water sitting on top of a house can quickly find its way inside, destroying contents and weakening the structure, so the faster it’s removed, the better. Snow can be heavy, and a deep snow can collapse a roof if it’s allowed to build up.
And once you have a pointed roof, you have additional room to place things like heat exchangers/HVAC systems, cooling fans, etc. Plus the ability to better insulate the lower living areas by having an attic or crawlspace.
Latest Answers