Plastics are made from petroleum. Transforming plastic waste into fuel or some other compound is an engineering task.
Catalytic pyrolysis will yield a usable oil. You can even used a mixed stream of plastic. Halogenated plastics aren't very good for this, but most waste would be. The process was understood in the 1980s.