I visit about 2-4 local fair events a summer to support a fire department, Church or private school and I know that the price will be high but I look at it as a donation to the charity.
I'll set an amount that I'm going to spend {donate} and when I hit that number I'm gone.
If you look at the individual price of an article, you will get upset and do what you did, leave.
I have a problem when the charity involved is the county fair itself. If it were the VFW or a church having a brat fry I would feel differently.