Crooked Timber has a great post on utility functions:

But any competent economist knows that utility isn’t an explanation of observed choices, it’s a way of representing them. The representation is simpler if choices satisfy some minimal consistency requirements, like transitivity (if you prefer A to B and B to C then you should prefer A to C).

Utility functions aren’t ‘real.’ Even economists forget this sometimes. For example, this post by Greg Mankiw notes a paper where the authors us a social utility function. The notion of a social utility function is clearly silly if we remember that utility functions are just a way for thinking about “preferences,” which are, arguably, only a way for thinking about how people act.