Your inconvenience was caused by the sender not the Royal Mail.
It’s changed recently to a flat rate of £2 and it covers the extra cost of handling items. It goes through a different system when it’s not got postage on, it doesn’t just get sent along with the rest and get picked out. The £2 also doesn’t fully cover the cost of handling mail where postage hasn’t been attached.
They don’t know where things have come from so can’t charge the sender. You can get a receipt to claim it back off the sender, (obviously not in this case but you could if it was a business).
If they didn’t do it people would forget to put postage on all the time!