And it wasn't abortion that got the "religious right" organized at first, it was racism. It all started with the early evangelical movement around the turn of the century. After
Brown v. Board of Education a lot of evangelical churches in the South started their own schools so their kids wouldn't have to go to integrated schools. Then, after
Roe v. Wade, they made common cause with Catholics, who opposed abortion, to increase the power of their movement. By the mid-80's the evangelical right had started exerting real political influence, and as a result GOP politicians had to start pandering to them. The bottom line is that the leaders of the movement became more concerned with power than in doctrine. They give Trump a pass because he is giving them what they want - the racist and anti-abortion policies they've been seeking for decades, and they offer the excuse that even though he's "flawed" he's doing God's work so it's OK. Here's a good explanation:
https://www.washingtonpost.com/outlook/2019/11/21/explaining-unbreakable-bond-between-donald-trump-white-evangelicals/