How does peroxide heal surgery scars? I thought it was hair bleach.

It doesn't. Hydrogen peroxide is primarily used to cleanse dry blood and any scab that might have formed. It is actually not recommended for open wounds and should not be used on either open wounds or scars. Warm tap water or normal bathing can do wonders to clean most wounds. It has no role for established scars, although scar massage with a good moisturizing cream can be helpful for early immature scars.
Cleaning. Hydrogen peroxide is something that i recommend be used temporarily and briefly, and usually only used to clean off dry scab or debris that might form on the scar. It can harm healing tissues if overused. Peroxide can remove dead debris on the top of the scar that could harbor bacteria, which may then damage the healing site and cause a larger scar. Peroxide helps indirectly in my understanding.
Avoid. Peroxide is an indiscriminate cell killer. It kills both bacteria and good cells. Avoid in clean wounds always.