It prevents other workers from underbidding them, by making it illegal for the employer to hire those workers due to the contract liberty suppressing mandate to engage exclusively in collective bargaining with the union.
Forcing companies to pay more than market wages is also bad for society at large by discouraging investment into such companies. More investment into companies leads to lower consumer prices which translates to an effective wage hike for all workers.