2 reasons. Depends on the model, and drivetrain. Some are reliable.
However, the OP is not buying new.
We do not know the maintenance history nor the type of driver the previous owner has done.
Secondly, you simply cannot compare a BMW 7 series to a Toyota Corolla. Have you seen the number or computer modules in the 7 series? Lol.
Generally speaking, a corolla or other simple Japanese car will be A LOT more reliable than a BMW 7 series or similar.
There's a reason why country's like ours around the world have a majority of Japanese cars. They are much more reliable in the long run with a lesser maintainence cost throughout their life.
When I hear Audi and BMW, I think of timing chains failures, guide failures, vanos issues, modules failing. Etc and etc.
Had two mercedes diesels in Canada. Gl350 and a w164 ml320 CDI.
I will list the failures I had in just 3 months ownership of the gl350.
Bluetec system heater, swirl motor flap seized, turbo inlet seal failure causing swirl motor to fail, injector failure, air suspension faults, air compressor failure, traction control fault, diesel fuel system leaks apart from wear and tear items like wheel bearings etc.
The w164 was a lot more reliable, except that had the intake seal leak and swirl motor seized as well.
Googling will show these as common faults.
You won't find these types of complex issues on a corolla per se. Not to say it wont have faults