She was primarily nominated by the EU council.
The parliament would have picked Weber, but nobody cared since its just there to rubber stamp predetermined decisions.
He was the leader of the party which won the plurality in the elections and had its support. EU had a real chance to move towards becoming a real parliamentary democracy if it went that way.
That was the election before the current one. She was the one out forward by the PPE this time and even then she was the second candidate put forward by the PPE after Weber was vetoed by France the previous time.
That’s the new Spitzenkandidate system. The council is supposed to pick the candidate put forward by the main political force in the parliament.
The EU is a real democracy anyway. All the members of the council are themselves democratically elected. It has a weird three parts political system but everyone in it is elected or appointed by people elected.