It's based on EU law
Specifically, Consolidated version of the Treaty on the Functioning of the European Union - PART THREE: UNION POLICIES AND INTERNAL ACTIONS - TITLE VII: COMMON RULES ON COMPETITION, TAXATION AND APPROXIMATION OF LAWS - Chapter 1: Rules on competition - Section 1: Rules applying to undertakings - Article 102 (ex Article 82 TEC)
Any abuse by one or more undertakings of a dominant position within the internal market or in a substantial part of it shall be prohibited as incompatible with the internal market in so far as it may affect trade between Member States.
Such abuse may, in particular, consist in:
(a) directly or indirectly imposing unfair purchase or selling prices or other unfair trading conditions;
(b) limiting production, markets or technical development to the prejudice of consumers;
(c) applying dissimilar conditions to equivalent transactions with other trading parties, thereby placing them at a competitive disadvantage;
(d) making the conclusion of contracts subject to acceptance by the other parties of supplementary obligations which, by their nature or according to commercial usage, have no connection with the subject of such contracts.
This law says, in essence, that a business that is dominant in a market (e.g. Google in search engines) cannot use that dominance to unfairly advantage their own goods and services over their competitors.
The more general issue
Most jurisdictions have anti-trust (or anti-monopoly) laws as a matter of public policy.
This is because a dominant business (a trust, monopoly or oligopoly) is in a position where it can charge as much as its customers can bear because it has no competitors to force it to charge a price closer to the cost of production. While this is good for the business, it is bad for the consumers - in much the same way that armed robbery is good for the thief but bad for the victims.
This has been an issue since Roman times but modern competition law arose from the creation of "natural" monopolies in the late nineteenth century, specifically railroads in North America. Building railroads is expensive and owning the only link between say New York and Baltimore gives you the ability to charge people who want/need to use it whatever you like. That is you make extortionate (and I use the term deliberately) profits. First the Canadian and then the US government legislated to prevent it.
Does Google actually have any (legal) obligation to provide an objective search result?
It seems to me that they offer a service and it is up to the users to decide whether they want to make use of that or not.
Not if it is the only game in town - a business with market dominance is not offering users a choice between them and a competitor, they are offering a choice between them and nothing.
If I make a search query on Amazon, I wouldn't demand of them to also show Google Shopping's results. So what is different the other way around?
Amazon is not a search engine, it's a shopping portal. Amazon does not have market dominance in shopping portals the way Google does in search engines. Even the if they did, they are not abusing that position by marginalising competitors in another market the way Google search is influencing the online shopping market.