Texas is trying to go after Amazon shell companies; I'm not sure if California has tried that route.
In Texas, there are two companies involved: Amazon.com.kydc, Inc. is a wholly owned subsidiary of Amazon.com, Inc. The sole business of the former is to operate physical facilities, some of which are in Texas, and which provide warehousing and shipment of books for the latter. Texas argues that this constitutes Amazon having a physical presence in Texas, but Amazon disagrees.
So Amazon has physical buildings in Texas, and Amazon disagrees with that state's position that they have a physical presence in Texas. Only a lawyer could argue for such a twisted interpretation of reality with a straight face.
Amazon owns a company that has physical buildings in Texas, and disagrees as to whether that constitutes a tax nexus or not. Pretty easy to argue with a straight face! Tax law is a matter of technicality, not "does it seem about right".
If I own a house, I own a house.
If I own a company (which is just a paper entity, made-up), and that company owns the house, then, I pretty much actually own the house. Maybe not in a technical legal sense, but in a reality sense.
Always be wary of "paper reality" created by lawyers. It's not real. It can be a useful tool, a useful abstraction, but it can also separate us from physical reality, and can be used for evil purposes, and produce non-sensical results.
Another point related to this is that there's a lot of precedent in the courts where, even in a case where someone is claiming to be doing something which is technically consistent with the law, and/or are very carefully exploiting a loophole or ambiguity, there are judges who give rulings based on the principle of, "if it walks like a duck, and talks like a duck... guess what? it's a f*cking duck!"
Amazon doesn't have buildings in Texas. A subsidiary company does. That company is required to pay taxes in Texas. Amazon however, by not having a presence there is not required to pay taxes. This is old hat and a tactic used by almost every successful company in the world for at least 150 years.
In the long run it is far more beneficial for consumers and corporations. The only ones that lose out are the governments (the citizenry don't lose out by proxy because any potential revenue would be spent in non-beneficial ways regardless).
Small companies lose out also, because in general only large-ish companies can afford the overhead of maintaining shell companies. (Not just for this particular loophole, but for lots of loopholes involving shell companies.)
I don't know how they are affected by this bill. But it will be interesting to see what happens with it.