It appears as though they welded the top piece at an angle to the bottom instead of bending it in a press brake. They must have had their reasons for this.Wow.
Thanks for the images. One never knows till the hidden is exposed.
Your rub rail will need a termination where cut. If not fixed in place it will move due to heat/cooling expansion and contraction.
I wouid expect that the part was counterbored for the studs, and then filled with weld. Don’t think they went all the way through, as you’d see it from outside.
Think you were right in pulling this part for replacement