I think it’s so you can fit the cents symbol at the end e.g. $6.75c - but this isn’t really used anymore so the dollar sign at the front is a bit of a historical anomaly at this point.
I suppose it's also possible it needs to sometimes be used (although, again, I have never seen this) in certain cases in more 'formal' situations - accounting, contracts and so on. I guess the format, with the symbols wrapping the numbers so as to make them easier to parse, does make sense.