That's a great way to get your bike stolen. Not only that, it's also quite significant additional cost, because now you have to buy and maintain two bikes. At that point, why not just take a car?
Not everywhere has a high theft rate and one can insure a bicycle. Cars need fuel, usually gas/diesel, but sometimes electric, and the costs to maintain is much higher.
Besides, if you do get in a pinch, you can roll your bike with you while you walk in many cases. In the cases where you cannot, you can usually leave it locked somewhere and fetch it later on. You can do this in ways that you cannot in a car.
Besides, a bicycle only takes a portion of the materials to make a car - even two of them only take a portion. It is still friendlier.
In a society where bike use is much more common, the risk to have a bike stolen is diminished by diffusing it among a higher number of bike users. Also, bike locks are a thing. Larger train stations also sometimes have dedicated bike storage facilities with CCTV and security personnel, which makes that threat even less likely. Also, bike insurances are a thing and they don't cost that much. Certainly much much less than the cost for a car insurance. (And that's before you take into account all the externalities of cars that are not correctly priced into their ownership.)
Bike locks are generally irrelevant. If people can't steal the entire bike (which they usually can despite the lock) they can take off most of the parts - the tires, saddle, handlebars etc (whatever you have not wrapped in a lock).
Pretty much all locks are like that: Some determined folks will take a work-around or take what they can. But they also do what a lock is supposed to do: they deter crimes of opportunity. You bike is no longer as easy to steal as the unlocked bike.
The bikes are not very expensive, you can buy them second hand for about 100-150 EUR. And what do you have to maintain in a simple bike? Just adjust air pressure every couple of month and that's all.
Owning a car in Amsterdam is crazy expensive due to parking. For example, the parking costs at my office is about 500 EUR/month (only to park during workdays between 7AM-7PM)
Honestly, I'd happily ride a bike there because it is so flat.
Trondheim (Norway), on the other hand, has a hill with a bike lift. Just one, though. The rest you have to pedal. I, the immigrant, still find it amazing folks ride bikes with studded tires on the snow, let alone manage the terrain. I usually just walk.