If you're a contractor, it's often preferable to keep qualified people on staff even if they have nothing to do because it makes bidding for future contracts easier. You can say "I have X people qualified in Y ready to go" instead of "we'll have to hire X people to do Y".
But there's also just bad hires who can get through interviews, they won't just leave, and building a case to fire those people takes time and management that gives a shit. At a large enough program at a large enough company with uninvolved management (and they can afford to be uninvolved because the program's doing well on all tracked metrics), you can get away with being negligible deadweight for a shocking amount of time. I wouldn't recommend it because your team will hate you, you'll build no skills or relationships, and you'll be the first to go when cuts happen, but some people are fine with that trade for whatever reason.