pain tolerance

Hi docs

I always see muay thai practitioners kick trees or karate guys punching wooden post. is it possible to become more pain tolerant by conditioning the body like that? i personally dont see how that would be possible but there must be a reason why they been doing that type of training for centuries