An expense is a cost, but you can also use this word to mean the figurative cost of something. If you find it embarrassing to dress up as Santa, you might say that you do it to amuse your nephews, at the expense of your pride.
When you give one thing up in order to get something else, its cost or sacrifice is the expense of getting what you want. You might worry that politicians want to cut taxes at the expense of schools that need money, or that oil companies increase drilling at the expense of the environment. The root of expense the Latin expendere, "to weigh out money or pay down."