This can happen if the parties were not married at or near the time of the child's birth. Sometimes a child is born to a married couple, but the couple have been separated a long time. In that situation the mother and her husband know that the child is not the husband's biological child, but they may need to prove it for purposes of a divorce or other legal matter. Sometimes the mother of a child decides that she does not want the father to see the child or be a part of the child's life. If the parents of the child were not married, the alleged father may need to bring a lawsuit and prove paternity in order to force the mother to let him see the child or to have regular visitation or custody.
Adoptions often involve paternity tests.
By proving who the biological father of the child is before the adoption, the adoptive parents are able to be certain that the true biological father has given his consent to the adoption. Without the paternity test, the adoptive parents may worry that the true biological father could be someone else, and that he might later challenge the adoption. There are also medical reasons to have a paternity test. It may be important to the child's healthcare to know the health history of the child's biological parents and their extended families. For example, knowledge of family health history can be important in diagnosing a child's current medical condition or may suggest early screening for certain types of hereditary disease.