To start up your tow vehicle and drive it away, it takes a key.
However, anyone with their own tow vehicle can uncouple your trailer, couple it to their truck, and drive it away.
A simple lock through the coupler can prevent it from being uncoupled.
An unattended trailer can face the same risk.
The same lock can keep your coupler closed, preventing someone else's trailer ball from mating, which helps in theft prevention.
Thieves are clever; they know that even if the coupler is locked onto your hitch ball, it's easy to pull the pin on the ball mount, mate the mount with their receiver while it's still locked, and steal your boat, RV, race car, or whatever.