My previous dog has done that twice, and my current one has done it once.
Both times for my previous dog it was because glass had unfortunately got stuck in his paw when he went on a walk. So it infuriates me when I see people smashing glass bottles etc outside, especially when it's smashed on...