As I understand it, baptism creates a capacity for the vision of God in heaven; but the limbus infantum was never taught as a place of eternal suffering or torment, like those who have turned away from God during their lives. The idea is it’s a place of natural happiness, but just without the kind of glorification of souls who have received a sacrament during their lifetime. And as others have said, Limbo is not a dogma, just a theological idea. God must have some plan for these innocents, but perhaps to impress upon us the importance of baptism, we aren’t given an alternative. There is a lot more that we don’t know about existence than we do, and even what is revealed about death is not knowledge per se but accepted on faith.
Edit: My argument would be that infants and the unborn have an objective and innate desire for baptism as creatures of their Creator, intended for eternal communion. If a catechumen, who is not yet baptized but intends to be, can have baptism imputed to them in case they die before receiving the sacrament (baptism of desire), then I think it’s fair to consider infants and the unborn also as possessing another kind of baptism of desire. Others would say this depends on what decisions they would actually have made in life, which cannot be known.