According to the rules, Trump's votes earned him 18 delegates. He got them.
Similarly, Cruz' votes earned him 18 delegates. He got them.
Rubio's votes earned him 5 delegates. And he got them. Subsequently, by suspending his campaign, he lost them -- again according to the Louisiana rules.
Those 5 delegates were then equally available to Trump and to Cruz. The prior voting totals had been rewarded appropriately and were thus irrelevant. One candidate was prepared to tae advantage of the opportunity. The other was not.
Cruz won the additional five delegates by out-smarting and out-working his competition. The Trump campaign lost out due to lack of preparation and failure to respond to opportunity.
Contending that the outcome was obtained unfairly, by cleverness and without integrity is just a loser's whining. To his credit, Trump apparently understands his error -- he's now hired a pro to manage his delegates for him.
Cruz didn’t win the delegates, that is the point you don’t seem to grasp.