My understanding was the 7800 was a lower cost system to make.
The 5200 was a comparatively expensive machine to make, so that would help profitability.
There was supposed to be a 5200 to 7800 adapter for 5200 owners.
That would have been a good gesture to 5200 buyers.
from Wikipedia:
"On May 21, 1984, during a press conference at which the Atari 7800 was introduced,
company executives revealed that the 5200 had been discontinued after less than two years on the market.[5]
Total sales of the 5200 were reportedly in excess of 1 million units,[1] far short of its predecessor's sales of over 30 million. "
That was well in advance of the 1985 XE announcement, and years before the XEGS (specifically games targeted marketing system).
The 5200 was obsoleted (discontinued) by it's own financial viability, not the XE's or 7800.
The newer introductions were supposed to be solutions.