And that does not justify having more rear armor than they do while having less frontal armor.
How exactly? All of those tanks have significantly better guns or frontal armor to protect themselves. If the Churchill was easily destroyed by a cheap flanking medium tank, no one would ever build it. Its survivability is literally all it has, compared to the doctrinal heavy tanks who all have significantly better offensive capabilities.
Your claim that because a tank is label "heavy" it should win over a "medium" is simply flawed. Heavy tanks simpy not "hard" counters to mediums tanks.
Given the fact that the generalist heavy tanks KV-1 and Churchill will confidently win in the majority of fights versus the generalist medium tank P4J that costs approximately the same I'd say my point is pretty much proven, but yeah whatever I'm sure it's "simply flawed" for unknown reasons.