That's almost completely false.
It obviously depends on the kind of plastic. PE and PP are made from ethene and propene, which are indeed byproducts of fuel refining. But demand far outstrips supply now, so these are now made on purpose. PS is made from styrene, which is not a byproduct. It is made from low-value chemicals, so it's upgraded waste. PET is made from terepthalic acid, which is very much not a waste product of any process.
Even if there were any waste products from fuel refining, they would certainly not be vented. They'd be burned as fuel. Which is also a sensible thing to do with waste plastics. (Someone is going to object that this releases CO2. It does. Burning fuel releases CO2. We can come back to this point once we longer burn coal or methane for energy.)