It's rare, but I remember reading that USPTO has mistakenly issued conflicting patents. Legally, any publication is enough to bar others' patents, they're just not good at finding anything in the software literature, so having your own patent sort of rubs examiners' noses in it.