In Germany, public officials ("Beamte") are paid a bonus depending on (a) their marital status, (b) the number of kids they have and (c) whether their spouse is also a public official (you get less then to avoid receiving the children bonus 2 times).
This has multiple reason: one feels a bit ancient as the states basically want their "Beamte" to live in an "orderly" family situation and thus encourage marriage and children.
However, AFAIK, a major reason is to counter a disadvantage "Beamte" have regarding health care insurance. For historical reasons, they are not part of the public welfare system (or rather, they are in a different, older one). The state pays half of their medical expenses (if you are part of the public health care system as a "normal" employee, your employer pays half of the health care insurance). To cover the remaining 50%, Beamte need a private health care insurance. In the public health care system, your children and non-working spouse can be added to your health care insurance for free. With a private insurance, that is not possible - you have to pay for an additional insurance for each kid, and your spouse if he/she is not working.
There is a calculator for the federal level here: https://oeffentlicher-dienst.info/c/t/rechner/beamte/bund?id...