Direct Flights are usually cost more and usually, it is cheaper if you stopover in the HUB of the airline. e.g. Before the cheapest for me to fly between Calgary and Phoenix is fly Delta with a stopover in SLC. Now, the cheapest is flying AA with a stopover in Dallas but this way, the 3 hours direct flight becomes 10 hours because Dallas is quit a detour
Anyway, in the West Jet case, neither Calgary nor Edmonton is the HUB for West Jet and the only explanation is hardly anyone fly between Edmonton and Phoenix while the demand is higher between Calgary and Phoenix.
It’s just so hard to figure out all the variables.
I hope your trip goes well.