They don't break rocks to show everyone how cool they are. They make them break rocks and whatever with their hands or heads to strengthen their nerves so they don't buckle under pressure.
The alternative, currently being used in many countries, is constantly yelling at recruits throughout training, which imo does provide results but also creates a lot of instable fucks.