A building is a structure that has occupational space for its inhabitants to stay in. It differs from other structures such as footpaths, roads, bridges, towers, etc. in the fact that most of its space is enclosed and meant to be occupied. Buildings are used for various purposes which include living, working, manufacturing, business, and other things.
Buildings serve many purposes in video games from simply being part of the environment to being an actual location that the player my journey in and interact such as a store.