He saw it coming at the last second and lifted his left leg. You can see his ass is over to the right side of the seat as well, from him lifting his leg.
Then he got lucky again and smacked his head on the roof, where the sheet metal could bend and absorb the impact. Then he smacked his head into the swingarm of the bike when he fell down.
Pretty damn lucky for a moron with no helmet on. If he didn't lift his leg, he'd have broken bits.