Need to add in the cost of the mouse and keyboard that came with the iMac, but I agree. Some will argue even with this addition, the price is essentially the same. Additionally, not sure of your reasoning, but wouldn’t the $599 Mac Mini work as well?
You're right on both counts, I wrote $799 because most people will want to upgrade from either 256GB to 512GB storage or from 8GB RAM to 16GB ... after all these years the same base storage/RAM as the 27" iMac is a bit ridiculous.