If Obama thinks he will capture states like Wyoming, Kansas, Montana etc., he is truly absurd. If he had any brains at all, he would focus his money on the swing states.
Obviously he doesn't think he can or will win them, but considering the huge money advantage he has, it makes sense to spend money in them to try to steadily build Democratic support in them for future races, to help Democratic candidates downballot, and finally in the odd chance that he could flip them especially if a landslide starts materializing (not likely, but at least possible).
It's worth noting that most of these smaller states haven't been given any attention by any Presidential candidate in decades, so we really don't know what would happen if one of the candidates actually did spend some money in them. It hasn't been tested as a strategy because no one has ever had the resources, but it's worth trying as an experiment anyway.