Because an acquittal is not a finding of innocence. It is merely a finding that a person was not determined guilty to the level required by law, i.e., beyond a reasonable doubt. It is entirely possible for everyone to be "pretty sure" that a defendant is guilty but for the defendant to walk simply because they couldn't cross the evidentiary threshold.
In those rare instances where actual innocence are found, the jurisdiction does end up paying for the defendant's attorneys fees, and more, as a result of the civil lawsuit the defendant inevitably files.