Strange discrete errors when reading HC-SR04 sonar sensor
I think it's from the HC-SR04... it uses echos and it seems your bad readings are some kind of echo reflections.

What you should do is either remove the bad readings, or take the average/most common value of the last x readings.

Or throw away values too far off some default (like the last average) and average the rest.