You need to look at the ACEA rating of oil A1, A2 or A3 for petrol or B1, B2, B3 or B4 for diesel. This is the quality of the oil and how well it lubricates. Car manufacturers always specify a certain minimum grade. The grades go up to A5/B5 but I have never seen them, guess we would be into F1 oils at those ratings.
The ratings are for many things including temperature stability, foaming, sheer (high speed forces), sludging any many more. Clicky ACEA Specs
The 10W40 etc is just the viscosity at different temperatures and most ratings are suitable for our climate. Occasionally a manufacturer will specify a different viscosity especially where they have had problems with narrow oil-ways getting clogged. Sometimes it is specified to obtain a better MPG.