Those mounting ledges are really rails that the brake pads ride on. They take all the force of the brake pads trying to spin with the rotor as they clamp the rotor. The caliper is a floating caliper, meaning its just mounted on its own sliding rails/pins to fit over the pads and squeeze them like a vice, the caliper doesn't have to fight spinning with the rotor, the pads are on rails to counter that.
As the pad wear and become thinner, they have to move along that rail closer to the rotor so they can still make contact with the rotor, even though they are thinner. The caliper, having only one piston, has to also slide along its own rail/pins as the single piston extends to take up the difference of the thinner pads and pull the pads. This set up is far cheaper and more reliable, then other set-ups where you have to have multiple pistons on each side of the caliper to equally squeeze and move the pads and the caliper has to take up all the force/torque of wanting to spin with the rotor as it squeezes the rotor. The floating caliper has 1 piston, and its able to slide around over the top of the pads, which the pads are mounted solid on the rails around the rotor.
The interface between the pads and the rails doesn't seem to be ultra-precise, they don't fit that tight. So as long as the rail is straight and pad can slide along it without catching, it should work fine. Thats where the idea comes from, filling in those depressions/divots to make the rails straight again, so the pads can slide along without catching. But remember, a ton of force is put on those rails from the pad, just filling in those divots with JB Weld or some sort of epoxy, no matter how strong, is probably NOT going to work. What ever you use will likely just get pounded on, crack, break open and fall out, leaving behind the depressions/divots again, UNLESS, you use something as strong as the metal itself, like filling it in with a bead from a welder that you grind down to fit back into shape.
SO, if one of the pads is sitting in depressions or divots in the rail, how well is that pad going to want to slide out of the depression/divot and move down the rail to take up the wear of the thinning pad? The pad will probably stick there and eventually wear down enough it doesn't contact the rotor and not make much braking force at all, or maybe just one of the 2 pads will, but that would probably make a lot of vibration, etc.
Some people are a little cautious, because welding can effect the metal and create some brittleness or weak points from the heat. As well, since the steering knuckle is made of cast iron, already a brittle metal, they worry that welding on it will create some sort of problem that might cause something to crack or break. I'm far from a welding expert, but the arguments for welding up the spots make sense to me, the portion to be welded is pretty small, so its NOT going to get the rest of the rails hot out enough to cause any problem. I would think, the worst that would happen is something to the metal right next to the repair, that would weaken it somehow and you would get chips or small cracks in that area, which would only put you back to as bad as when you began. People that have used them for years after welding them up only re-enforces those opinions.