Because most things don't combust completely. Also, plastic is not just hydrocarbons. It's a collection of very complex long-chain molecules that resemble hydrocarbons, but may also contain chlorine, esters, and so on.
Burning plastic also contains dioxins and complex hydrocarbons that are generally pretty nasty.
Here's a simple test: If you burn plastic, but can't smell anything, then it's undergone complete and perfect combustion of long-chain hydrocarbons. If you get black smoke, or can smell things, then the combustion isn't complete or the ingredients going in or coming out weren't just hydrocarbons.