Madzai has already explained, but once again, I cannot stop emphasizing that this game's AI is terrible, mostly because they were never meant to be 'good' in the first place, but to serve one purpose; to hinder a player.
Notice:
1) AIs nearby a human player ALWAYS build bigger fleet than those who are not, despite the fact that they never scouted a human player's empire, an indication that AIs know full map.
2) When AIs create Federation, it is almost always tend to be empires that are nearby a human player. Yet another block to stop human player's expansion.
3) New in 2.0, as the game progress AIs tend to stop expanding their borders too much.... until player's science ship surveys those unclaimed area. After a player's science ship surveys area, you will notice suddenly AIs will send their own science ships then send construction ships to claim that area. You can actually exploit this by not letting your science ship to survey the area until you are ready to claim those 'lands', this way you can kinda stop AIs from expanding those area to a certain extent.
The biggest problem of this approach, other than the fact that this makes the game highly asymmetrical, is that it actually ruins AIs so they perform WORSE than AIs that don't.
The end result is that AIs around a human player end up having very weak economy because they spent too much resources on building and maintaining fleets. Some empires took happiness penalties from factions when they form a federation, and finally this exploitable claiming behavior that basically gives the control of expansion to a human player rather than AI itself.
The food problem actually starts as lack of minerals or power because of gigantic fleets, this causes the buildings to stop functioning properly, which makes farms to stop functioning, then even more unhappiness creeps over AIs, completely disables AIs other than keep spawning small rebel nations inside of their territories. If you see an AI empire which contains a lot of single-planet empires, that AI empire is probably suffering this issue.
But all of these issues are merely symptoms. The cause of these problems is from the AI programmers of Paradox who are trying to make AIs as hindrances to a human player rather than actual player AIs that properly play the game correctly.
Until those AI programmers change their minds about what Stellaris AI should be, we will continue to have another 'food problem' as they try to add even more human player hindrance mechanics.