Because those companies chose to operate in the EU. Regulating its market is one of its main tasks, and certainly not a waste of time. That depends on the perspective. From the perspective of a company abusing its market dominance, it is indeed a pain. For the perspective of companies which are not dominant and consumers, it is really desirable for the EU to be active in this field.