The battery isn’t locked by iCloud. But a stolen iPhone that’s iCloud locked is typically parted out. If those parts aren’t as easily sold, there’s less motivation for them to be stolen.Why do you keep bringing in the issue of stolen iPhones. I travel to many developing countries where theft would be likely and my iPhone has never been an issue. I do not believe the battery is locked by iCloud but rather a reset code needs to be applied within iOS. I believe this is less to do with theft rather than Apple being transparent and honest about replacement part pricing as without these lame tactics of providing a code within iOS people will just get a battery at a fraction of the cost. People have successfully replaced an iPhone battery without problems in the past with the unnecessary iOS code.
It’s good that you’ve never personally had your iPhone stolen, but iPhones are frequently stolen nonetheless.