Madame, puzzled, said 'let them eat brioche', which is a small, light pastry. She had recollection of bread shortages (probably yeast-related) where the palace made brioche as a substitute.
The 'cake' was a mis-translation.
There was also a law in force that required a baker to sell cake at bread prices if he ran out of bread first.
She was hardly an unfeeling aristocrat. She and the King contributed from their own personal funds for famine relief. You won't catch any of todays Democrat royalty doing anything like that. They're all about using OUR money while they keep theirs.