I think it was a question of enforcement and knowing that the cops weren't going to pursue violations, but it was actually a Supreme Court decision that made contraception fully "legal", meaning including unmarried persons. Prior to that various statutes (nothing from the Supremes, but from states) legalized contraception for married couples. New York had such case law, but doctors just kinda forgot to ask if you were married or not. Or if they did ask, the patient simply responded that she was married. No one checked.