That's how I learn as well. I've found that reading code is a completely different thing from learning. Not even tangentially related.

I can read a codebase and run simulations in my head. But this almost never results in learning anything. I can study code and see how a particular task is done, but I don't learn it until I put it into practice. Just about the only thing I get from reading other people's code is the most egregious ways to not do something.

This is a pretty common thing, a plurality of humans learn this way. We just have different standards for software, for some reason. We like to pretend books teach you something more "real" than just getting your hands dirty and writing some real fucked up code. But the reality is that figuring out why your disaster code doesn't work, and then fixing it is one of the most educational experiences a programmer can have.