Brakes convert your bikes kinetic energy into heat – they don’t always do it efficiently. When they are not working at their most efficient some of the energy is converted into sound pressure energy instead of heat.
Predicting this behaviour has kept many, many professional Engineers and Scientists fully occupied for 40 hours a week and 52 weeks a year for the last 100 years. In short it’s very difficult to predict when your brakes will do this and what circumstances create the necessary conditions.
Mountain bike manufacturers can’t afford the research to do this before they release the brakes for sale. Hence mountain bike brakes make more noise than some brakes (cars mainly). So long as they’re still stopping you I wouldn’t worry about it 😀
I do this stuff for a living.