Are certain types of loyalty categorically unreasonable?

I want people to express their opinions on the following questions/​idea. I guess the answer will depend on your personal definition/​interpretation of loyalty, but I guess that’s the point, I want to see what people think about what I consider to be an important topic.

It seems like there is a spectrum of loyalty.

Maybe on the left end we have “transactional” loyalty; as in the case of, “if my spouse doesn’t cheat, I will stay with them.”

Maybe on the right end we have “stubborn” or “cost-independent” loyalty; as in the case of, “if a member of my military unit dies, my unit will recover the body—burning through all available resources if necessary.”

In practice, does “stubborn” loyalty exist? Is it desirable? What about when it comes to beliefs? Does it allow for institutions to flourish that couldn’t otherwise? Is this type of loyalty categorically unreasonable?

I guess these all seem like prisoner’s dilemma questions, about “tit for tat” strategies, etc, but I want to know how people on this site think about these matters in everyday life; in personal relationships, with regards to their own beliefs, especially toward their children (if you have children).