The story
From fruit + machine. * (slot machine): From originating with machines with fruit pictures * (criminology): From being a machine used to identify fruits (“homosexuals”) * (food): From being a machine containing fruits
Etymology from Wiktionary, CC BY-SA 4.0.