Check valve in HOT outlet nipple on water heater tank is cause of noise.
It is a cheapo plastic plunger/spring/o-ring assembly. Mineral build up, weakened spring, o-ring out of position can cause squealing, chattering noises as water flows thru it.
The check valve is used as a cost saving measure (cheaper part/easier to install) vs a shut-off valve in hot outlet line for isolating the water heater. It is there to prevent backflow into water heater when bypassed.
They usually end up clogging up or failing which then ends up restricting/stopping hot water flow out of water heater.
I'm glad my water heater uses 3 shut-off valves....no cheap check valve