Is it illegal to carry $7000? Why do you wonder; STASI agent wannabe?
No, but it’s stupid and risky as evinced by leaving it in a store.
Actually in the 1990s it was illegal to transport large sums of cash without supporting paperwork. It could be seized on the spot and you might face years trying to recover it.
I don’t support such legislation but it is best to be aware and take precautions.