A pulse reflects from a closed boundary on the opposite side (with a phase change of 180°).
The reflection process can be understood by considering in detail what happens to a weighted rubber rope.