None of the Windows compatible all-in-ones could be configured with a latest generation Coffee Lake Intel i9. They were all at best the last generation i7, and none had 5K monitors. No comparison possible. Closest with a 27 HD monitor, 4K, came in at $3897. . . But it lacked the Intel Coffee Lake 9900-i9, had only 32GB RAM max (compare 64Gb on the iMac), and maxed out with a 1TB SSD (2TB iMac). . .
The only way I could configure with identical/comparable components was a desktop Dell tower and since Dell has dropped their 27" 5K monitor, go with LG from another source. Wanna complain? Talk to Dell and HP, whose all-in-ones only go up to Intel i5s .. . .
Well, you don’t have to compare top of the line. Of course when you compare bits and hertz Apple always comes in high.
Besides, who wants an All-In-One anyway.