Can you specify the actual statute he was arrested for before commenting on whether the LEOs handled it correctly or not. The MA statutes I've read don't indicate a crime on his part.
I'm not a lawyer, but I think laws against trespass are fairly straightforward just about everywhere. When you are asked repeatedly to leave, and you don't, you're trespassing. Just because he was invited doesn't mean he can stay as long as he likes.