I personally doubt that Frodo and Sam "shared a very strong friendship". Maybe they did -
after the Quest.
But at first it was more like benevolent master- faithful servant relationship. Frodo had been friends with Pippin, Merry and Fredegar - but not with Sam.
When they had to travel to Mordor alone, Frodo learned to rely on Sam more and more - but then he had no choice. Sam's devotion has gradually become all-consuming - more akin to that of a faithful dog.