Utility is a requirement of patentability in the United States. In particular, an invention is useful if it provides any identifiable benefit for society. Essentially, this basic patentability requirement is used to prevent the patenting of hypothetical devices or those devices that are impossible.
A common example of a hypothetical device is the perpetual motion machine. A perpetual motion machine is a machine that can work indefinitely without the need for an energy source. However, these machines are only hypothetical because they would violate the first and second laws of thermodynamics.