Your spouse files for divorce, and the first thing they tell you is that they're going to make sure you never see the kids again. They want to get full custody. They think it is best for the child if you are no longer a part of their life.
While there are rare cases where this makes sense, such as cases of abuse, most of the time it goes completely against what experts say is actually best for the children. In reality, it just represents what is best for your ex or at least what your ex thinks they want at that particular moment.
If you really put the kids first, it's clearly best for them to stay involved with both parents. Children who get this interaction are healthier and face fewer developmental challenges. It can help them adjust to the divorce itself, and it's good for their emotional development and growth.
After all, your children did not necessarily want to see the end of the traditional family unit. They're just kids with two parents, and both of those parents have a role to play in raising them. Even if their parents make the conscious decision not to stay romantically involved with each other, that does not change anything for the kids. They still want and need to see both parents after the split.
Again, there are a few exceptions, but this is the general outlook that most divorce and child development experts hold today. If your spouse is threatening to take the kids away from you for good, make sure you know what legal options you have.