I been having this happened too me too. At first I thought it was one of my rings but after some testing some things its not. Could you perhaps be in the covenant the way of white or the white way, w/e it's called? I stopped gaining random humanity after leaving that covenant.
To answer your question about gaining humanity at the bonfire after dying; I have only been able to confirm gaining humanity at the catacombs while I have 00. It happened to me every other death. My guess is its a zone thing, maybe something to do with area bosses as long as there's a bonfire for that area?
I haven't been able to confirm that outside the catacombs.
I also thought maybe its a mob thing or time. after dying from the titanite demon in the catacombs, its been giving me humanity every other death. so i tried this out in anor londo and died by the same giant there (I confirmed time was not a factor with the demon). It wasn't working in anor but I also killed the area boss. and that's as far as I've gotten. not a lot to go on but I want to believe it has something to do with the development throughout the game, if you die too many times before you get to the boss and your out of humanity why not give you a freebie so you can luckily find someone to summon to help?