Other, so-called "right-to-work" states have outlawed the practice.
The clauses make sense for the union and their members because you cannot restrict the benefits of union representation to only members. That creates "free-rider" problems. The opposite argument is about freedoms of contract and association.
I'm unsure if you are typically allowed to make your own agreements with the employer when there's union representation. That's probably defined in negotiation, and whatever has traditionally been agreed upon for steelworkers etc. may not be the best model for tech workers.