Why does the cabin air sometimes smell of kerosene?
You might have been smelling cooked turbo oil.  Leaking seals can potentially allow oil traces into the compressor bleed discharge, especially on auxiliary power units.  The other possibility is cooked deicing fluid, which is quite common.

Turbo oil and deicing fluid are the two major sources of petrochemical cabin stink.

Another possibility would be an APU with stalling/surging problems where there can be backflow into the compressor end of the motor from the burner can, which will admit burner can gasses into the air conditioning system.  If it is really kerosene you are smelling, that is the probable source.  

It could be coming from the main engine but there would likely have been audible rumbling or thumping sounds if it was stalling/surging while on main engine bleed.