Particularly in British English, a common saying in response to someone's complaining about something is, "hard cheese". This basically means, "tough luck". How did this expression come about; what is unlucky about hard cheese?
"Hard cheese" is like when someone says "That's not good." "hard cheese" has the meaning of something unpleasant that has happened to you, hence the bad luck, because in order for bad things to happen to you, you would need bad luck (or so the reasoning goes).
Phrase Finder gives its origin:
This slang term for 'bad luck!' is British in origin and is now becoming rather archaic even there, although it is still used. It dates from the early 19th century and was used then just as a general indication of unsatisfactoriness. This piece, taken from a play called The Tiger at Large, which was printed in a collection of plays called The Acting National Drama, edited by Benjamin Webster, 1837, is the earliest citation I've come across:
Jem. His wages was too low. Don't you think a pound a month, and find one's self is hard cheese?
Hard cheese has, of course, got a literal meaning - cheese which is old, dried up and considered indigestible. That opinion was expressed in A Cyclopaedia of Practical Receipts, 1845:
Beer and porter should be particularly avoided. Hard cheese, unripe fruit, and especially beans, are also objectionable.
(Note: Receipts are what we now call recipes.)
The figurative meaning of 'hard cheese' clearly derives as an allusion to an unwelcome and indigestible course of events.
Hope that helps.
I don't know if the following naval battle has a relation with the origin of the "hard cheese" expression. Anyway, I like the story.
During the brief Uruguayan War (August 1864-February 1865), an Uruguayan ship ran out of cannonballs. The commander of the vessel hit upon a new weapon: stale Dutch cheese. The captain ordered to load cannons with the hard cheese.
When they fired again, the first two cheeses went over the target. The third shot was lucky, strucking the main mast of the enemy ship, shattering it to the extent that two sailors were killed by cheese shrapnel (bad luck!).
- Source: Cheese Won a Naval Battle
Another potential origin may also be related to navy (speculation without any evidence): "Hard cheese" was a usual part of the sailors food in the 18th century. Considering the sailors quality of life at that time, eating "hard cheese" wasn't a chance.