It's quite simple: for example, my right leg is straight and the bike is leaning to the right because I'm turning right... and the pedal is rubbing the ground. I shouldn't have my right leg straight at that moment, but sometimes, when riding, in traffic, with obstacles, speed, well, it happens...