A recipe for mayo cake was first printed in the 1920s, but it was in the 1940s that it became popular because ingredients like dairy and sugar were being rationed during World War II.