I’ve heard I need to open a shut-off valve (either a ball or a gate valve) before soldering it to a copper pipe. Why?

By opening the valve it prevents the washer inside the valve from getting damaged by excessive heat when soldering.