I thought airlines or airports were required to check your identity to endure that the checked in luggages fly along the passenger who checked them in, in case there is a bomb or something. Granted this rule is a bit absurd in a world where most terrorist attacks are suicide attacks.
Certainly when a borading pass, matched to a passenger who checked in luggage, is not used for boarding the luggage will be unloaded.
Identity check really depends on the airport and airline. Sometimes your identity is checked when you enter the secure area, sometimes at the gate and sometimes not all.
Even at airports that don't check identities airlines - notably budget airlines - may check id at the gate.
It may also happen that id is (spot) checked upon exiting the plane, but this is very rare.
That's only applicable for flights within the Schengen area. Passport checks upon leaving or entering the Schengen area are pretty strict. Essentially every piece of id is checked towards the SIS[1]. But within Schengen and depending on the airport there may be no checks at all.