In the case of Google and Microsoft, they are buying data to put up on their websites. They acquire data through partnerships. Microsoft, for example, owns a company that builds digital sensors that collect data, so they actually have a commercial arrangement with them. They buy data from different satellites around the world. They buy data from other sources, if and where it's available.
Their model is to try to get as much data for as low a cost as possible, and if it is freely available they will use that as well.