Playing through the story of GTA 5 will take you through a number of buildings and interior locations — pretty much all of which are locked out when you're not playing a specific mission or if you're in Online. Why did Rockstar close off these interiors, and why did they add significantly fewer interiors than in previous games altogether?
GTA 4 featured a wide range of various interiors that could be accessed at any time when roaming about the open world, including the interior of that one hospital that everyone hunkered down in after collecting a six-star wanted level and blocking the entrance with a patriot.
The newer installment, however, is all about the outdoors. Featuring the most non-urban areas since San Andreas, GTA V's open world is much more focused on wide open areas and wilderness than previous installments. Even the city of Los Santos feels much more open and roomy than Liberty City did in the previous game.

However, the contrast is more extreme than simply the more recent title featuring more open spaces. GTA 5 doesn't have a whole lot of interiors that the player can access by conventional means, though there are a few locations that can be glitched into. A few that are accessible include the Pacific Standard Bank, the upper floors of the IAA building and, of course, the Vanilla Unicorn.
But when looking into the reason as to why these locations are locked out, the answer is an elusive one. The most obvious reason would be to improve loading times in GTA Online by simply not spending resources on the interiors. Thing is, the interiors do load — they're just inaccessible to players.