"When a measure becomes a target, it ceases to be a good measure". The reason unions are useful is because people form unions for them to be useful. Once you have people forming unions simply to comply with a law requiring unions, their utility will plummet.
As analogy, suppose the president decides that people who eat salads are healthier, and so gets a law passed that says that everyone has to eat at least one salad a week. People who are opposed to eating salads will just eat a tiny piece of lettuce and call it a "salad". So now you're going to have to have complicated criteria saying just what a "salad" is, and people are constantly going to be gaming the system, so you'll have to constantly update the criteria, and have people going around enforcing the criteria.
The concept of a "salad" is hardly clearly defined, but we don't need a good definition because people aren't motivated to nitpick about it. Similarly, the concept of a "union" isn't really well defined, but it's a useful term because people (for the most part) aren't motivated to fudge the meaning, but if you pass a law requiring people to be in a "union", you're going to have to have a solid definition.
What is a "union", exactly? An organization of workers that advocates for the workers' interests? Then people are going to start an organization of workers, have it send a few letters to management with perfunctory advocacy, and call it as "union". So, what, are you going to have a governmental agency charged with coming up with "minimum activity" requirements and launching investigations into unions to see if they're sufficiently "union"-like?
One of the biggest weapons of a union is the strike. Are you going to make participation mandatory? If not, then the union is going to be largely toothless. If you are, then this is more of a "mandatory strikes" proposal than a "mandatory unions" proposal. Allowing unions to force a strike by force of law would create a massive opportunity for abuse. It would give unions control of members' livelihoods, and provide a huge incentive for corruption.
Something else to keep in mind is the strong history of racism in unions. It's in the interests of people who are currently in the union to keep the supply of labor as low as possible. That means restricting access on any basis they can get away with, whether it's on the basis of onerous licensing requirements, immigration restrictions, racial segregation, or whatever else they can come up with. If only members of the union can work, then whoever seizes control of the union can restrict employment to only the people they like.