Backfiring can be due to an air leak at the manifold which is why cars with broken exhausts often do it. For reasons I have never understood, motorbikes tend to do it if they are running lean. I would have thought it should be the other way around as there would be more unburnt fuel but that has never been the case in my experience.
Keith