Yup, it isn't perfect but provided that everyone is largely seeking the same goal (company success) it tends to get you to better outcomes.
Btw this can be true of other departments as well – for example, SaaS product marketing is often an entity that exists to serve internal "customers." Product management can be envisioned this way as well.
If my coworkers need my services, then that's because they are developing something that a customer needs. I think of it like a dependency-tree. As long as you trust your company to not have multiple teams develop something that will never see the light of day, or something the user doesn't want or need, then this mindset is absolutely a good one (Sadly been there, done that too).