Like I said, it can take some thought and analysis to discern the underlying logic. Still, I tend to think that even though of course not everything is 100% logical in politics, it's more logical than it may first appear.

"how can you be against the death penalty, but pro-abortion"

People who are pro-abortion don't consider it to be murder, but rather just a normal medical operation done for the benefit of the mother. Whereas the death penalty - or really any harsh punishments at all - is perceived as being "nasty", brutish, uncivilised etc.

compare LGBT support on the left today, with their persecution under most communist governments in the past

Putting my flame-retardant suit on for a moment, the reality is that if you scratch the surface, the left hasn't changed at all in this regard.

A key tenant of leftist intuition is that the world can be perceived through the lens of identity group oppressions. It's always been this way since Marx: he was obsessed with the perceived bourgeoisie oppression of the proletariat (capitalists vs the working class). Hence communists being so frequently anti-semitic, as Marx perceived Jews as being intrinsically bourgeoisie.

Now LGBT oppression wasn't a communist thing - all societies considered homosexuality to be taboo up until incredibly recently, it's been one of societies most stable taboos - most likely due to higher STD rates amongst homosexuals, and inability to create a family. That was a much bigger deal in times before state pensions, when children were the primary way to be supported in old age.

The switch then is simple enough - the modern left is obsessed with the perceived oppression of LGBT by white middle aged men. The important thing is not exactly which group is being oppressed by which other group; the important thing is that oppression is happening and must be stopped. The fall of the USSR and rise of Chinese manufacturing did huge damage to the idea of capitalists vs the working class being the fundamental division in society. The disappearance of the taboo against homosexuality as STD rates fell and social security rose, caused the old division to be seamlessly replaced with "white men vs women and minorities". Same old, same old.

the Christian US right that mostly ignores Jesus' rather socialist teachings, while the mostly non-Christian left is in a hurry to bring them up

Interesting example. I've not thought of Jesus as a socialist before. If you mean "love thy neighbour", that's not socialism, that's old fashioned charity - and conservatives generally give more to charity, if I recall studies correctly. Or which things said by Jesus do you mean?

Unions used to be (still are?) anti-immigration, and kind of a left-wing thing?, while the left is pro-immigration

Unions represent the 'old left' and must do structurally, because their goal is to represent the financial interests of their members: blue collar labour, mostly. But this doesn't always hold true. Unions in the UK financially support Labour, which is stuffed with pro-EU MPs and which just came out in favour of a second referendum (i.e. trying to cancel Brexit). Given the choice, they preferred to support mass immigration of low wage workers, than be ideologically disloyal.

The idea of immigration as inherently positive is a somewhat recent development. Marx had nothing to say on the topic and actual communist states only ever had problems stopping people leaving, not arriving. However we can see that it's plenty logical from a perspective of moral reasoning without regard to costs - poor people live in poor countries where wages are low. We don't know how to make wages rise in those countries but if they come here their wages/standard of living will go up a lot automatically. So it's immoral to stop people coming here and benefiting that way.

Environmentalism and animal welfare were right-wing positions in Nazi Germany

Left and right have got completely messed up in any discussion of the third Reich. We're told by academics that Nazi Germany was far right, but this doesn't stand up to scrutiny. Consider how many similarities there are between the regimes of Hitler and Stalin (who was uncontroversially ultra-hard left). Both hated jews. Both put people in concentration camps. Both explicitly expansionist. Both obsessed with identity politics (racial for Hitler, class based for Lenin). Both dictatorships with no love of democracy. Both with heavy state control of industry.

Now compare that against the world's most right-wing country by general consensus, the USA. Everything I listed above is the exact opposite of modern American values: no concentration camps, democratic, "the American dream" of social mobility regardless of identity group or class, and so on.

The Nazis being environmentalists fits perfectly well if you simply discard what you're told and evaluate the ideological position of that regime independently.