There is a steel pin driven into the lock cylinder which fits into a slot in the housing. When you insert the key and turn it to the left you can either push it down to lock the forks, or pull it out if the clip is removed. The same steel pin keeps the lock in the down (locked) position when you turn the key to the right to remove it. Trying to remove the lock without first turning the cylinder/key all the way left will damage the lock.
If you have the same lock as I do and you can pull it out without first turning the key, you can also pull it out when the forks are locked.