Although a badger is a pretty small animal the badger is pretty strong and can usually defend itself easily against other large animals.
I've seen a honey badger come up against 2 lions and the honey badger actually won the fight.
The badger also can release a foul smelling secretion from it's anal glands which stinks and helps to ward off the attacker of the badger.
The reason badgers stink is because they use a foul smelling secretion that they release in self defense.
The badger and particularly the stink badger has foul-smelling secretions that they expel from anal glands in self-defense.
So when you smell a stink badger or a badger that stinks it's because of the foul smelling secretions from their anal glands.
The smell can linger for days but eventually the smell will go away if the stink badger does not need to release that secretions for awhile.
But as soon as the badger needs to release that secretion from it's anal glands the badger will stink again.