This is honestly the most successful part of the Republican strategy over the last few decades. They wanted to elect people who would pass tax cuts and legislation that disproportionally favored the wealthy and large corporations, but needed more people to vote for candidates like that. But how do you get people to vote against their own interests?
That was the genesis of aligning with the Christian right. Get people worked up into a froth about things like abortion (something Republicans weren’t previously against) or the “gay agenda,” and then have candidates who say they will save the country from those kinds of evils. People vote for those candidates, who then get in and pass the tax cuts and such.
Most of those folks don’t actually care about those issues, it’s just a way to fire up their base, and it’s worked frighteningly well.