The thing is that offering the free thing to begin with is often essential to getting market share, if they followed your advice, they might not have as good chance of success.
In the particular case, Gitlab clearly offered the free repos to compete with Github. They had to get mindshare and marketshare to then get paying customers. If they had not offered free repos at the start on the same (or better) terms than github, would they have ended up with as many paying customers as they did?
So the business plan (whether intentional or not, and I don't know) for many of these companies is to offer a free service in order to get mindshare and marketshare, then once you have a sustainable amount of attention and paying customers, eliminate or reduce that free service. (Or, in other cases, change your licensing from open source to something else).
To me, it seems both wholly expected, and wholly justifiable, for users to find this annoying and manipulative, and complain about it. Of course, users could avoid the free service in the first place predicting this is coming, sure, hypothetically. And companies could, hypothetically, avoid following this playbook if they don't want to upset users...