Some states have archaic laws enacted at a time when it was feared the big automakers, after selling franchise rights to independent local dealers, would undercut the family-owned businesses by selling direct. The real problem was that the franchise agreements were written by the automakers and when the dealerships realized this, they went to their state governments and lobbied to have laws enacted that prevented automakers from under-cutting their own dealers.
Tesla does not have independent dealerships so these laws are anti-competitive when applied to a company that has a new way of doing business. America is built upon the idea that those who bring the best products at the best price, wins.
A number of states have repealed or modified their laws so they don't apply to companies without franchise dealerships but other states have left them alone because they are effectively an anti-business, anti-competitive barrier to new competition (namely, new EV start-ups). And because it hinders sales of EV's, it benefits the Texas oil industry while it harms consumers.
People in states with backward, anti-competitive laws that violate core American principles of capitalism and open competition should write their state legislators to repeal those archaic laws. Really, the problem originated with auto dealers who signed franchise contracts that didn't grant them protection from competition from the very company they were signing agreements with.