Where Do Loss Functions Come From?