Hi and thanks for reading.
In the legacy/standard paradigm, you deploy your app on a VM or on Kubernetes (GKE on Google Cloud) to run it. And YES, you are in the VPC and you have access to it.
BUT, what about the new paradigm, such as serverless? You aren’t in your VPC because you are on a shared infrastructure managed by the Cloud Provider. Of course, you can use a serverless VPC connector to plug the serverless product to the VPC, but it’s not so convenient.
In addition, if the Cloud SQL isn’t in your project, or, at least, in the same VPC as your VMs or your serverless VPC connector, you have to use peering (and the peering isn’t transitive, that leads to another issues).
The correct solution here is something that should come in 2022, to have a PSC (Private Service Connect) for Cloud SQL (today PSC is only limited to HTTP traffic and not compliant with TCP connections).