It's all about the pivot point.
With a 5th wheel hitch, it sits around 12-16" above the truck bed, so there is comparatively little torque applied to the trailer frame.
If you just use an extension leg to meet a ball that is sitting at bed level, you dramatically increase the torque applied to the trailer frame, so unless the frame is designed to handle the extra loads, it can fail. Not guaranteed to fail but generally they aren't designed for these loads.
There is a gooseneck system where a frame is mounted in the truck bed and it still uses a ball but the pivot point is basically at the same level as a 5th wheel pivot point negating the issue. Of course, that eliminates the idea of not having a big hitch in your truck bed.