How did labor’s alliance with the Democratic Party come about?

How did labor’s alliance with the Democratic Party come about? Do you think labor’s political values are compatible with those of the Republican Party? Then why did many workers vote for Republican Ronald Reagan in 1984 and 1988, despite the AFL-CIO’s endorsement of the Democratic candidate?