K9 training isn't that expensive, Byte, especially for narcotics-only dogs. A couple thousand for a good dog from a pure line and a few thousand for the training, then a couple thousand more to train the officer. All told, $10-15K max. I've even heard stories of dogs gotten from the pound who have been successfully trained for narcotics work.
There is continuous training that needs to go on and annual certifications. Plus, the cost of the maintenance of the dog; food and vet bills.
If a dog costs upward of a half mil as you state, then there would be very few agencies with dogs. Most of the agencies can't afford that price tag for a tool used on occasion.
Here is a link to one of the Denver area agencies looking for funds to buy two dogs:
http://www.denverpost.com/news/ci_17493347
They are estimating costs at $20,000 each (but I know from personal knowledge they are going to train them for narcotics, search and aggression, so the cost is higher)