According to the serial number on his preserved details, he was a war machine before he was destroyed
Different countries were using robots in combat clashes. Tommy was used by people and was fighting against his “brothers” - a hostile country was using a big squad of high-end robots. Tommy was 80% destroyed by a detachment of robotic liquidators. His central processor was also damaged. After the war, Tommy as any other war machine was sent to dump.
He was lucky because the robots that found him were not that greedy and evil. When they found Tommy on the dump they tried to disassemble him for parts, but then they realized that he’s still alive. Then, he was fixed up with different details from slot machine to shopping cart.
Now he’s known as a local weirdo. He wanders around the junkyard all day and collects spare parts. If you ever need any parts - be sure to contact Tommy. He’s a bit dumb, but all the robots on the dump respect him.