Weeaboos and some anime/manga like to go on about how the katana was a samurai's soul, with weird spiritual connotations, and how losing it was a terrible stain on one's honor. At least one work portrayed it as completely unacceptable for anyone but the owner to even touch the sword, and when left with no other option than to hand it to the police, he broke the blade in two first.
From what I understand, when they were actually fighting wars, samurai mostly did so with bows and polearms. Japan has also, historically, had different types of swords.
Just how seriously did samurai take their sidearms? Is there ANY reality behind the reverence placed on these weapons in fiction?
While I do not know which work you are talking about, based on the fact a police wanted to take away a samurai's sword, the depiction is likely of the early-Meiji Haitōrei. Note though, while not discounting overzealous local officials, the official government order only says that, except for soldiers and police, the people were not allowed to wear swords in public, not that they were not allowed to own swords, so a police shouldn't be trying to confiscate swords. In actuality even in the Edo it was perfectly fine for non-samurai to own swords, just that only samurai and special people given the privilege were allowed to wear them in public.
There would of course be special reverence for extremely high quality collections or ancestral swords, but the reason for the widespread discontent caused by the Haitōrei was not because samurai loved the sword in and of itself, but because the privilege to wear the katana was a symbol of status that set them apart from other members of Japanese society, and the government was taking away that privilege (among many others taken away in that time period).