The Rook is allowed to pass through a controlled square. It's just the King that can't.
Don't feel bad, GM Viktor Korchnoi asked that of an arbiter during his candidate's match against Karpov. He was considered one of the top 5 players in the world at the time.


The next movement of this was a castling from white, I could't show it in the graphic because it didn't let me do that. So my question is? Is it a bug/problem for chess.com?
This was a real game two days ago and I posted a comment on that:
"How is possible the movement 23 white (O-O-O)? I mean, my bishop is attacking the path of the castling, I knew that you cannot do castling while some piece is attacking the path of the castling."
Feel free to enter to my profile and watch the game, that game was vs telit on march 6