If your flight was domestic then yes indeed you could have been just sent via the baggage reclaim area as no immigration control would be necessary,
If it was international (as in the OPs case) then people would need to (re) clear UK immigration and have their IDs checked etc
So yes there is a system / protocol for when this happens to (a) offload you from the flight and (b) get you out of airside abd (b) depends on the route.