From my experience in FM and looking at how the AI approaches squad building with teams that tend to have relatively few players in real life (Bayern is great for this, small squad irl and lots of money to splash in FM), the core of AI squad building is a 23 man squad. 3 goalies, 20 outfield players, so the first eleven, a back up for every outfield player and two back up goalies.
Add to that a couple player extra due to youth players moving to the first team, the AI generally being very proactive with their budget so a lot of teams buy before they sell, then buy again after they sell, AI having a weird quirk of double purchases and you'll see the bloat beyond the original 23.
One of the major issues is that the AI is horrible at slimming down a squad. Player requests a transfer because he never plays? AI sells him, then instantly uses that money to get in a replacement for a player that left because he never played. Sometimes the new player is actually so good that he can replace one of the old players (who then requests a transfer half a year later because now he isn't playing any more), but often these replacements that clubs pay silly money for never play either and end up getting sold for half the price a year later. Only to then get replaced again in a never ending cycle.
Also, this 23 man squad framework seems pretty universal, so even clubs that play 1 match a week for almost the entire season run around with back ups for every position, that obviously will never play, because the first eleven is never tired. Doesn't help that AI managers are horrible at rotation, even if they have high rotation stats. As a result, even teams that should play enough games that their players should get plenty of matches have a bunch of players unhappy about play times and a bunch of players that are about to kick the bucket because they play way too many games.