There are two different things you might want to do with a principle of utility: you might want it primarily to serve as a theory of obligation, your obligation being to do what maximizes utility. But you could also want it to serve as the foundation of a general theory of practical rationality, in which case maximizing utility need not always be obligatory. One of the tricky things about reading John Stuart Mill's discussions of utilitarianism is that, if not careful, you can easily make the mistake of reading him as doing the first, when in fact he is clearly doing the second. On Mill's account we don't have an obligation to maximize utility in every case. Obligations only arise when double analysis shows both that the original act maximizes utility, or at least is of very high utility, and that sanctions are required by the principle of utility. In other words, Mill has a positivist theory of obligation: without sanction, no obligation. (See Utilitarianism, Chapter III) The principle of utility still has bite outside of cases involving sanction, though, because for Mill it delineates the very character of practical rationality. This is why, in fact, it is able to underlie the positivist account of obligation; obligations are acts, of the sort preferable from the perspective of practical reason, that are such that punishing failures to perform those acts is itself practically rational.
When you recognize that Mill's utilitarianism is really a theory of practical reason, many of the moves Mill makes begin to make more sense: the particular way he argues for utilitarianism in Utilitarianism, the discussions of the art of life scattered through Mill's works, the combined insistence on the (relative) inviolability of moral rules and tolerance for non-maximizing strategies, the fact that he has always been difficult to pin down under one of the standard utilitarian labels, and (I would suggest) the otherwise obscure connection between Mill's utilitarianism and liberalism. I would also suggest that Mill's utilitarianism turns out to be a much more interesting theory when we regard it as a general theory of practical reason rather than as a very odd and inconsistent theory of right and wrong.