It's not legal in the U.S., where union organizing is protected under law. The beginning of the article says:
"Google unlawfully fired employees for attempting to organise a union, a US federal agency has said.
A complaint filed by the US National Labor Relations Board (NLRB) alleged that Google unlawfully monitored and questioned its employees about their union activity."