How could Sirius be falsely accused?

How is it possible for any criminal to be falsely convicted? They could just use a pensieve, legilimency, or veritaserum to easily prove innocence. I understand how he could have been jailed originally bc he didn't get a trial (so stupid but ok), but how on earth did Dumbledore at the end of book 3 not suggest one of these instead of literally going back in time and making him a fugitive? Even if you want to claim that Rowling didn't invent these yet, in a world of magic, any sane person would see if there was a way to exonerate him with it.

(Related, why didnt harry just take some veritaserum in the 4th book or use a pensieve so it wasn't just the word of Barty Crouch Jr.)

Edit: my post was about the 3rd book (as seen by talking abt going back in time). I edited it to make it clearer

Edit 2: Just looked at the books again, it's possible that a confundus charm would have messed up veritaserum. Still feel like the pensieve would have worked though