The reason brakes squeak after being replaced is usually due to glazed brake rotors or brake drums.
The brake drums or brake rotors could be glazed or even warped and can cause the brakes to squeak after you replace the brake pads or brake shoes.
Normally the brakes should not make any squeaking sounds when they are replaced properly.
However it can sometimes be normal for a little bit of squeaking at first for a few hundred miles of driving after the brakes are replaced.
The brakes sometimes need a bit of time to wear in on the vehicle but the brakes should not squeak a lot or should not continue squeaking after a few hundred miles.
Whenever your brake pads are replaced, your brake rotors need to be removed, measured, and machined or replaced.
Also if the mechanic failed to sand or remove the glaze, this can cause a very high-pitched squeak or squeal noise, especially when the brakes are cold.
Stuck brake calipers can also cause your brakes to squeak after the brake pads are replaced as the brake calipers may not be releasing far enough and the brake pads could still be rubbing against the brake rotors.