Of course they’ll be royally pissed off at you. Food costs money and most food places operate on thin margins.
There really are few legitimate reasons for doing what you describe and certainly none for doing it a second time or more.
They would have every right to refuse you this type of service in the future. You’d have to go in and eat there or pay and then take it home.
Whether or not they will varies from one place to another.
They’ll either dump it or eat it depending upon what rules are set up regarding employees taking food home.
I remember someone who works for KFC commenting on the foolishness of wasting food which had to be dumped in the trash at the end of the night rather than feeding the homeless or allowing employees to take it home. But that was the policy.