Check with a light inside the "hitch ball cover area".
Specifically, check that your latch that locks the ball into your hitch is not bent or worn.
When hitching up, if the ball is on a bind, the latch/lock won't close easily if the latch is bound up. NEVER force it! Much easier to raise the tongue again and reconnect than damage the hitch/tongue.
My guess is you had it in a bind and instead of the latch sliding into the neck of the ball below the head, it was somehow jammed into the ball and every turn wore down the latch. I'd be very surprised if the ball itself is worn.
Without this latch/lock functioning properly, the trailer can come unhitched and disconnected from your hitch.
FYI. Many of these latches are adjustable via a nut, so it is possible it isn't engaging fully- the same as if you had the wrong ball size.
Speaking of which, what ball size did you have on your hitch? I switch my hitch regularly between different trailers and sizes of balls, heights, etc.
If you did use the wrong size or the latch was jammed or worn or mal-adjusted, it would cause what you describe pretty quickly and needs to be corrected before towing again.
Hope this helps!