These, and a lot of other things are pretty much randomly left/right. For example in the UK it was the traditionally right wing party that legalised same sex marriage. In the 70s the left (then actual socialists!) opposed EEC membership, by the time we left the EU it was the right who wanted to leave.
What the US never had (and which is pretty much dead in the UK now) is a real economically left wing party. In the UK this has lead to a lot of people (including myself) feeling that there is not much difference between the big parties. This helps for extreme parties in the UK. In the US which is more of a two party system perhaps it helps feed the rise of extreme movements within the existing parties?
And yeah, politics are a lot more complex than left/right so you will often see a party you'd normally consider left/right enact a policy you'd see from the other side.