Why can't I programatically create a location field in a node?
It's simply because the stable version of the Location module doesn't support Entity API.

There's a patch here that claims to provide the missing support, obviously use with caution on a dev version of the site first.