Apple will replace the battery for $79 [1]. When you consider the cost for a battery, the labor for replacement, the confidence that this is not a junk replacement, and the warranty for the service, that's a very reasonable price. There is no way Apple is making money on this.
[1] https://support.apple.com/iphone/repair/battery-power