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 ...