Rashi on the verse explains:
"WHO SAID TO HIS FATHER AND TO HIS MOTHER, I HAVE NOT SEEN HIM — When they sinned in the matter of the golden calf and I said, “Who is on the Lord’s side, let him come to me” (Exodus 32:26), all the sons of Levi gathered themselves unto me, and I ordered them each to kill his mother’s father, he being an ordinary Israelite, or his brother on the mother’s side, or the son of his daughter whose husband was an ordinary Israelite, and thus did they do. — It is impossible to explain the term “his father” literally, and “his brothers” as being those on his father's side, and similarly to understand “his sons” literally, for really all these are Levites, and of the tribe of Levi no one sinned, as it is said, “[And there gathered unto me] all the tribe of Levi” (Sifrei Devarim 350:1, Yoma 66b)".
Which means that the verse is about how the Levites stood up to all those who sinned at the golden calf and did Hashem's will and for that they are blessed.
Chizkuni also brings the golden calf idea, but has another idea as well:
"If his father or brother or son dies, he must act as though he doesn't know him "for the Levites observed your commandments" as you said "He shall not go outside the sanctuary" even in his period of mourning he cannot leave and go after them..."