Linearity is a problem if it interrupts the player experience; otherwise, the openess of the game should be decided according to the game's needs. In a title like The Last of Us, the player will rarely notice the linearity because of the strength and pacing of the narrative: you feel compelled to move forward because you want to know what happens next. The game encourages the player to spend time in every area, picking up collectibles that inform on the world and hearing the optional dialogue of companions (usually Ellie). Further, while the game moves you from city to city and doesn't allow you to backtrack, the player must creatively navigate limited areas according to their resources and the level's stealth requirements. One must constantly reassess how they attack new areas according to their shifting challenges; for example, when the player's control switches from Joel to Ellie, the player essentially must throw out their entire rulebook and learn to fight as a teenage girl rather than a grown man (stealth takedowns take longer, hand-to-hand combat isn't possible as a last resort). Other times, a player might conquer a level using mostly stealth and shivs, but find in the next that they only have bombs and guns. Finally, the game achieves a balance between corridor-style linearity and a more open kind; when trapped in sewers, basements, and buildings, the game can feel like the former, but in a good way -- it leaves the player feeling claustrophobic, intentionally and to the boon of the narrative. When players reach large towns, they're allowed to breath, collect resources, and interact with the environment.
For a game like Final Fantasy XIII, however, linearity becomes a problem and it's a valid complaint about the game. We're told of a large, grand world, and the minute details of it are central to the plot. Yet we're allowed to see only thin slivers of it. We want to travel outside of the backalleys the game forces us into to learn more about the world that dictates our narrative, but cannot. Instead, we must learn about it through datalogs (which is a huge narrative problem for the game). The corridors have no variety and no break; you run through one after the other with identical strategy each time (run, fight enemy, collect treasure, repeat). It's not until hours into the game that the player gets a reprieve, but even then, exploration is optional and repetitive sidequests. The player becomes hyperaware of the linearity because it makes for a repetitive experience and injures, rather than supports, the narrative. A similar game that suffers from linearity is The Order 1886 -- it's not just a problem with JRPGs.
Open world games aren't necessarily superior, either. They can often leave the player feeling lost or, again, interfere with the narrative. In Shadow of Mordor, for example, one is lost within Mordor and has no reason to follow the main plot (which is weak). Gratefully simply running around Mordor and slaying random Orcs is fun thanks to the Nemesis system, but even if the player wanted to do their story quests, they're given little direction towards them.
To demand that all games shift towards an open-world format just because some popular games have done it (like Skyrim) is myopic and trendy. Open-world, linear, and anything in-between can be done well, and should be selected according to the game's unique needs and purpose.