I didn't know till I heard the advert about a protection for ladies shoes that driving barefoot is illegal. Is this a fact and if so, what is the possible risk or reason behind it?

I always drive barefoot even if I'm wearing flats and I also tested for my drivers barefoot and the traffic cop didn't warn me. I find I have more control on the pedals if I don't have shoes on