Yes, it reduces the amplitude of the echo signal by half. Shifting to the right by one bit is division by 2. It’s the same as:
echo = echo / 2;
but faster.
You can try reducing by a smaller amount, but it will require expensive math operations. If the math takes too long, the code doesn’t have enough time to run.
Try dividing by 1.5:
echo = ((echo >> 1) + echo) >> 1;
This is the average of echo and echo/2, which is effectively echo/1.5. I’m not sure how many cycles this operation will take, so you might want to reduce your sample rate to give the loop more time.