Inspections help keep junk and unsafe vehicles off the road. It's a pretty inexpensive safeguard for the highways.
Not sure how RV'ers that don't enter the state often keep registration valid... I expect Escapees and others will come up with a solution, but I suspect it's a small number of vehicles compared to total state resident populations.
AS I recall it, Mass inspection sticker was $85 for two years. Fine for no sticker on windhield was $100 or more for each time if you got stopped for it. Stickers were different color for each month, so easy to spot if expired.
ALso one of the least expensive fees that Mass RMV charges for vehicle registrations.