[Question] On utility functions

Hello all,

I am new to alignment theory and was hoping to get a better understanding of utility functions. In particular I’m wondering why we talk about programs as always optimizing some utility function. Is this a known property of computer programs? Is there a theorem or something that says every computer program optimizes some function?

I’m also wondering, does this apply equally well to programs that can change their own code (or programs running on a quantum computer or other things like that, where it is not as deterministic as a typical python script if that makes sense)

Thanks!