After Kisame passed away, heck, even before he passed away, Samehada seemed to be attracted to Bee. What drove it to do so? The ownership of a sword only changes when the new owner defeats the old owner, isn't it? Or am I getting something confused here?
Found the answer in the Wikia article on Samehada. The ownership is actually based on Samehada's personality. It seem to have its own conscious (emphasis mine):
Samehada is unique for being a sentient weapon that gains nourishment from the chakra of others and as such, the blade is at its happiest when engorged with chakra that possesses both a distinctive and pleasant flavour. It apparently greatly enjoys Killer B's chakra since, according to Kisame, it tastes like octopus. However, it has shown displeasure towards fire-natured chakra, stating that — according to B — it's far too hot. Being capable of conscious thought, Samehada chooses its own user, an exclusive process that has often resulted in it being thought of as notoriously picky. If someone it disapproves of attempts to wield it, spikes protrude from the handle in order to force them to release their grasp, at which point Samehada will make efforts to return to its chosen owner. Even if it did betray its former owner for a more powerful wielder like Killer B, the blade was at least close enough to Kisame to mourn his death.