It is best to read the case in detail to better comprehend the circumstances.
www.saflii.org
Basically, when you bond with your stepson, and you undertake to participate in his development and share in his upbringing that you are committed to those expenses. In the case you divorce, pending on the circumstances, you cannot expect to terminate your contribution and expect the mother to inherit those costs. A divorce doesn't void that agreement. As you read in the court order all circumstances were taken under consideration and were ruled accordingly. It wasn't unreasonable in my view.