Not very amusing! Three basic errors which have happened a few times before:-
1) Gate boarding staff either asleep or incompetent
2) Friend - if not mentally impaired, well.............
3) Cabin crew failure to do proper checks.
Security implications are minimal since no self-respecting terrorist could rely on 1 and 3.
Who paid for the repatriation etc? Dep airport and carrier?