Cruz is thankful for Palins help in his winning a Senate seat. Palin did not support Cruz for the Presidency. In spite of this Cruz has a positive feeling about Palin. Trump has no such feeling regarding Walker. Walker has been very negative toward Trump since the debates. Could be that Walker is a sore loser and now has an opportunity to weaken Trump a bit.
Maybe you have followed Walker's statements since the debates but there was nothing in Walker's endorsement of Cruz today that mentioned or was negative to Trump.
By your standard, I suppose you can say any candidate that has dropped out would be a "sore loser" by endorsing anyone of the other candidates, such previous candidates Chris Christie and Ben Carson come to mind.
Frankly I am not aware of Ted Cruz attacking any of the ex-candidates that have endorsed Trump. Maybe you are aware of such attacks.
Attacking ex-candidates does not seem a smart move if you are wanting to eventually unite the party when there is finally a nominee.