Understanding and Improving Training-free Loss-based Diffusion Guidance