Some people have sex just to have children.
Others have sex sometimes to have children but also have sex when they don't want to have children. Many people have a good and enjoyable sex life without ever having children. This is because most people think that pregnancy should happen only if and when you want it to. You can decide not to have sexual intercourse but still have a full sex life by doing some of the other things couples enjoy during sex. However, most people do want to have sexual intercourse at some point in their lives, and many choose to use contraception until they decide to start a family.