how coin exchanges protect them self against stealing coins?
Remember that bitcoind is a reference implementation, but bitcoin itself is the abstraction of it.

In production environments not always you run the same software as in a desktop. 

There are other bitcoin implementations that are meant for use in production systems at scale. One of them is called bcoin by the folks at purse.io and open sourced. And there are others more even.