Sure, we can call having kids a luxury, we can call anything beyond basic survival a luxury. Luxuries are either worth it to people or they aren't, and biology has some pretty strong things to say about how worthwhile children are.
Of course having kids is an expensive extravagance, but very, very few people will choose to have a life without kids just because of the cost. Most of the people I know who cite cost as a reason they don't have kids were already on the fence about it to begin with.
With all of the people I've seen spend hundreds of thousands of dollars they can't afford on fertility treatments, the drive to have kids is not a rational one. Some people just need to have kids, and they'll do whatever it takes to have them. For them, any cost is worthwhile.
The drive to have kids varies though. In some it's an unquestionable calling, in others it's a consideration, and in a few, it's totally absent.
Likewise people don't generally pair up because it's financially beneficial. I would much, much rather pay a premium to be single than partner up with someone if I didn't already want to partner with them. By your logic, polyamory would be even smarter, but I have zero interest in that, as would generational homes and there's no fucking way I'm doing that either.
Most of our lifestyle decisions aren't made according to what is financially optimal. We want what we want and then the financially minded among is try to find ways to get what we want in financially optimal ways.
If we were all primarily financially driven, we would all live in communal housing and pooling resources like vehicles and tools and eat cafeteria style in sparse, prison-like accommodations.
But we don't.
Instead we have a lot of couples living in detached homes that are much bigger than they need with lawns and gardens that serve little purpose other than to suit personal preference, owning multiple private vehicles even though they could probably share one with some coordination and use of bikes/public transport, and traveling to visit their parents instead of moving them into their big homes.
I personally chose not to have kids and the financial element never once factored into my decision. I just don't want them. However, I have a very hard time living without multiple pets, which is absolutely not financially optimal. And like the folks who can't really afford fertility treatments, I was paying thousands for vet care as a broke student up to my eyeballs in debt.
Pets are certainly a luxury, and you can argue that children should be considered a luxury, but no "logical" explanation is going to displace the extremely normal human instinct to reproduce, or have pets for that matter, hence why even homeless people keep pets.
I could be much, much richer if I just lived a completely different life that I don't want to live. But I'm not going to do that. Same with people who strongly want kids.