A user scans the screen from left to right and top to bottom. So, we use the primary action (or primary CTA) on the right side while designing for the web. If we consider top to bottom scan approach in mobile, then why do we use the primary action above the secondary action while designing for mobile?
These are 2 different metaphors. On a desktop site, we frame the CTA as the end of the journey. Also, it's pretty unlikely that you'll have 2 buttons in a navigation, so it's very rare to be in a position where you have to choose.
Also remember that the top right area is the main focus for westerners, we've been brought up to do this since the first printed ads
On mobile devices, scrolling is the main consideration, so you should use the primary action as the first element, as you want to minimize scrolling.
That being said, this needs to be tested (like everything UX). Since your fingers will accidentally trigger actions when scrolling, it depends on the position. Is not the same for a responsive website with variable height on mobile as it is for a mobile screen with fixed boundaries
The way I view this is in terms of the page hierarchy. With the primary CTA being just that, the primary action, logically I would expect this to come before a secondary action due to its relative importance.
I think I'd disagree with your comment regarding putting a primary action on the right on web, there are many examples where the primary action would be on the left. I'd go as far to say that's what I'd expect, in fact as I look at SO, the button orientation is primary > secondary.
Translating this to mobile, and following a left-right, top-bottom reading pattern, I'd expect primary actions to appear on the left, and/or above secondary actions.
Thinking of the common OK/Cancel popup pattern in an OS like windows, that where OK is the primary action would also be on the left.
The reason I mention those example is that (in my head anyway!) the same hierarchy rules are in play, primary first, secondary second.