The quote is to replace the whole battery pack so I really doubt that they are making a profit on it since it's one of the actually expensive part of the car.
As GP pointed out this is hardly right to repair, if Tesla quoted a whole pack that means there aren't any official operating procedures to replace to fix that part without replacing it while you can 100% blame Tesla for that, right-to-repair is about making parts available to do official repair, it's not about letting you figure out clever fixes on your car.