Imagine a min-heap like so:
1
10 2
18 20 3 4
Now, say you remove 20
. The code you have basically sticks 4
in its place.
1
10 2
18 4 3
Since 4 < 10, it has to bubble up in order to satisfy the requirements of a min-heap.