I believe that the various employees at Apple and Tesla, like lots of employees at lots of companies, are there because they enjoy what they do and want to make and do great things. That includes technical and executive staff.
But the overall business goal is to make money, because unless they're making money they employees will not be able to continue making great things or doing great things.