So that users can only access so many entities during a page parse. This should apply to both Lua and the parser function whenever one of them needs to load a new entity.
This is needed to make sure that users can't load so many entities that things time out while rendering or even worse result in a php fatal. Also this could be needed as an emergency switch in case arbitrary access causes trouble to network traffic or the external storage.
Also we would be marking all such function calls as expensive (https://www.mediawiki.org/wiki/Manual:$wgExpensiveParserFunctionLimit).