The union is made up of players. For many, many years, a significant number of players were using steroids. These players were mostly interested with keeping their own pockets lined. Even if I believed that steroids and other PEDs were really all that devastating, I doubt they ever did, especially when weighing theoretical side effects later in life vs. millions of dollars they were earning now. That is why even a testing regime had to be forced on them under MLB, fan, and Congressional pressure.
Over time, I think we can see that that approach worked, slowly. Testing began. A generation of users retired. Newer players coming up in the ranks weren't using them because of the testing. And slowly, and most obviously only in the past few months, we've seen that the consensus of opinion even within the players' union is anti-PEDs. Players are outspoken about users being cheaters. The union is putting up less of a fight on appeals. I think the current players' union head (Weiner) is also a pretty solid guy and has pushed the new consensus. Blood testing went through relatively easily, when compared to the original fight over testing.
In other sports, where the athletes are not unionized (which is likely due to a wide array of different reasons), the sanctioning bodies have much more authority to impose drug testing and stiff penalties.