As others have pointed out, you seem to misunderstand what laws are and what they are for. They're not special and they're not magic, they're just slightly more rigid frames padded with layers of contracts and ultimately held together by good will.
To put it another way: a law can not stop me from killing you. Gun laws can make it more difficult for me to acquire a suitable weapon to do so, laws requiring the presence of an armed police officer at every corner may make it more difficult without having to deal with the police officer first, or immigration laws may make it more difficult to reach you, and murder being illegal means I'm very likely to suffer consequences after killing you (or after failing to do so if the attempt is illegal) but if I'm in front of you with a loaded gun in my hand, what's stopping me from killing you isn't the law.
I'm not saying Tesla can't do things differently as long as they operate within the law. I'm not even arguing whether its immoral for them to do so[0]. I'm just saying that laws are in the most real sense of the word socially constructed and they're an artefact of society, not the other way around. If laws are in conflict with a society's understanding of justice, eventually the laws will change, one way or another.
[0]: It is, although I appreciate that you seem to have constructed an ethical system that isn't built around reducing suffering and increasing happiness for everyone - which is fine, of course, in terms of it being possible for your ethical system to be internally consistent. It just makes me think less of you as a human.