It's a simple, but ingenious, anti-theft device: Turn off the car, and the steering wheel locks in place. Can't drive what you can't steer!
The way the system works is when you pull out the key or press the start/stop button, a pin pops into the steering column to prevent the wheel from turning, making sure potential thieves can't steer the car. Just remove your key, fob, or even smartphone these days, and that's it — the process is automatic. Head off and go about your day, secure in the knowledge that the position your steering wheel was in when you left will be the same until you return.
Yes, this means hotwiring cars isn't really a thing anymore, and hasn't been for decades. You can't get into a strange car, pull off the steering wheel shroud, twist a couple of exposed wires together, shout "Woohoo!" as the engine roars to life, and then peel out of the parking lot. Even if you could get the car started, your heading would be whatever the frozen steering wheel decides.
Maybe Ralph Nader's Unsafe at Any Speed got under GM leadership's skin (spoiler alert, it did), because the company began working on a number of safety features, and even created the ESV concept car to demonstrate advancements such as airbags and burly door beams to withstand severe side impacts. In 1969, GM debuted the modern steering column lock, co-developed with Saginaw Steering Gear Division. The system worked by locking the steering wheel and the transmission once the key was removed. It seems that the locks worked as intended because vehicle thefts dropped for a decade in the U.S. following their introduction.
Column-mounted locks weren't always possible, though. If you've ever driven a really old car, like pre-WWII, you probably noticed that the ignition was on the floor. The thing about those foot ignitions was that they A.) were easy to accidentally step on while driving, and B.) didn't allow for an easy steering wheel lock, which was relatively simple to design with column-mounted ignitions.
Speaking of age, depending on how old you are, you might not have ever operated a vehicle with a key-operated ignition, and discussions of such might be as esoteric as instructions on rotary-phone dialing. There may even be a day when you're going to ride around in autonomous vehicles that don't have steering wheels. But if your car has a start button, the principle of the lock is the same. A pin still prevents unwanted wheel waggling; it's just that the car's computer handles the operation. Turn the engine on with the start button, and the car goes, "Oh! I should unlock the steering wheel! The human would like that!" Then, a little solenoid pulls the locking pin.
At this point, you might wonder why steering column locks are still even a thing. After all, the reason starter-button-operated cars even know to unlock the column is because they sense the electronic fob inside the cabin. Without that fob, the engine is nearly impossible to start anyway. Unless, that is, you own one of many cars with keyless entry that can easily be stolen.
Federal Motor Vehicle Safety Standard 114 states that once the key is out of a car, it must have a system that prevents it from steering or driving forward, and why not stick with the tech that works? Besides, some countries still mandate specific steering locks, as is the case with Australia's Vehicle Standard, and not every vehicle maker wants to craft drastically different parts and systems for every market.
One day, steering wheel locks may go the way of the dodo. General Motors stopped using steering locks in full-size SUVs thanks to chip shortages, for example. Plus, as vehicles embrace steer-by-wire systems, such as the Playstation cutscene outtake that is the Tesla Cybertruck, locking the wheels simply becomes a matter of software programming. But if you have to have a locked steering wheel and you drive a modern vehicle (or an antique one, for that matter) without a column-immobilizing pin, you can always just get an aftermarket steering-wheel lock to take care of the problem yourself.