There were probably many complex factors at play. Personally, I think the biggest one, as TSMC's Morris Chang said, is the inhumane working conditions imposed on highly educated workers. But there were likely also issues around permitting and regulatory procedures, as well as the overall cost structure.
As you said, if it were just about labor, other countries would probably have some supply of it as well. But in the case of Eastern Europe, there was likely American pushback against the European continent. As you know, semiconductors today can't be made entirely by a single entity. They're connected through a chain of trust. If Europe were to move beyond just producing semiconductor equipment and start directly manufacturing semiconductors through fabs, it would easily become a competitor to the U.S. rather than a supply chain partner.
In fact, the semiconductor chain is deliberately fragmented so that no single player can monopolize it.
On top of that, the U.S. is using South Korea and Taiwan to contain China. Under the ideology of protecting foundries from Chinese aggression and industrial attacks, the U.S. is sending the signal that it can cut off the supply chain. Eastern Europe, on the other hand, is tied up with the EU, making it much harder for the U.S. to control.
In the end, what matters when the consumer nation, the U.S., outsources production is how securely it can relocate it. Look at what happened to Japan's semiconductor industry. It was crushed through the 1986 agreement. The U.S. simply does not tolerate the emergence of an independent manufacturing hub that possesses sovereign economic power.
What matters is whether the U.S. can maintain control while keeping the price low.