Why the bus driver is upset on me what i did wrong in Rio de Janeiro

Rio de Janeiro, Rio de Janeiro, Brazil
Why the bus driver is upset on me what i did wrong in Rio de Janeiro
I took bus number 167 and paid the driver 5 reais in cash. He gave me some coins back but didn’t provide a ticket. Then, he told me to go through these bars see picture, you have to push hard to pass through. I was struggling because I had a backpack with me, and the space was so tight that I couldn’t get through. Eventually, the bars locked me out. I asked the driver to open them again, but instead of helping, he started yelling at me. His face turned red, and he looked furious. I was shocked by his reaction. He started waving his hands aggressively and finally pushed the button to open the bars. I struggled again but managed to pass through this time. After that, I noticed him talking and yelling to a lady sitting near the door of the bus—she looked like security or some kind of controller. I couldn’t understand why he was so angry?