The thin iMacs didn’t have any room for that, so Apple added a memory access door to the back of the machine, but only on the 27-inch models, as noted by this support article: Memory is not removable ...
Original story: A late-2014 display hooked to an early 2012 GPU The GPU powering the 27-inch iMac with Retina 5K display is the R9 M290X, with the R9 M295X offered as an optional upgrade.