A moral imperative is categorical because its function is not to advise us how to reach some prior end of ours that is based on what we happen to want but instead to command us how to act irrespective of our wants or our contingent ends. Its rational bindingness is therefore not conditional on our setting any prior end.
Kantian Ethics (2008) - Ch. 4. The Moral Law