While you're right of course, I think you also just described why people have been switching to SOA (cough, I mean microservices).
If you encapsulate the database and related logic behind its own service interface, then as you get big enough to care about query performance, then only the team working on that microservice needs to care about how complex/tricky/whatever the optimizations become!