Guys, Why did he slap my thigh hard?

During art class (the seatings are spaced out so basically no one is packed up) my crush (who's short of a friend) sat next to me. When one of my was talking to me I leaned closer to her cuz the seating was spaced out as I said then surprisingly my crush slapped my thigh (nearest to him) (top-ish-side-ish middle) hard that the sound was loud. I turned to him and ask him why he did that (not in a angry way cuz I'm not pissed at that I was just blank). He replied "why not".
Guys, Why did he slap my thigh hard?
Post Opinion