This is a good question and one that readers, including myself, often ask. I think it boils down to J.K. Rowling and how she perceived the situation. She makes it very clear that Sirius was innocent. Plus, there was enough proof that Sirius was innocent; for example, Sirius was a member of the Order of the Phoenix and Peter Pettigrew betrayed the Order. While Sirius did assign Pettigrew as the Potters' Secret-Keeper, no one knew he was a spy for Voldemort and betrayed the Potters' location to the dark wizard. As you read, you know Sirius' protectiveness of Harry is genuine and that he loves the young wizard.