But in reality it rarely matters. If you were only allowed to use Java as a backend and your competitors could use anything your company would succeed or fail based on marketing and sales. The backend doesn't matter as long as they both have the same features.
I understand developer preference and different languages make things easier and make programming funnier. Languages have different limits.
As you become more senior you realize getting around those limits is part of the magic. If you come on to a project where the existing developer wants to write the backend in javascript because that's what they know I would rather use Javascript then wasting time trying to push a more 'pure' choice. Because in the end I am capable of writing it and what we will be judged on is if it works to achieve an objective not if it was the best language choice when using differentiation.