I have heard (but it could just be urban legend) that the reason why airlines check your passport before boarding international segments is that the airline would be on the hook to fly the passenger back to the point of origin if the passenger couldn't produce a valid passport at the destination.