My answer to why companies should train people if they can just leave for another company is twofold:
1: It evens out. Sometimes people will leave company A, which trained them, and come to your company, and other times they you will train them and they will leave. As long as the relative rates are about even, it should be ok.
2: Any general training that would apply to all similar companies can just as easily be acquired on the job at any given company. So train the employees, and if you really don't want to lose your 'investment' then perhaps treat them nicely?
Why are we always so quick to cry a river for huge organizations that hold a disproportionate amount of power over individuals?