But how often is your scenario going to happen compared to the one where it wasn’t a one night stand and the man knows about the child ( although he may not have told anyone else) ? For your scenario to happen, the child has to somehow find out who their father was and that the man died. Which I suppose could happen if they both sign up for one of those services that help adopted people locate bio-relatives but the chances seem very small that the father would sign up , if he doesn’t know this kid exists and that the kid would sign up unless they knew their father was a one-night stand. (rather than having been told he was a fictitious deceased partner or something.
A long time ago I was peripherally involved (as counsel!) in a case, where the woman in this situation had a child, but lost track of the guy. Then many years later, she saw the guy walking down the street and found out where he worked. She sued for parental support.
The guy initially doubled down and said wasn’t his son, denied the encounter, and so on. Looked like it was heading to court.
Then, as counsel for the guy told me, “The mists of time have begun to clear for my client.” He remembered the woman, remembered the encounter, and said he wanted to meet the boy.
Guy and boy met, started to bond. Woman told guy that she wasn’t asking for years of back-support, just wanted to help boy go to university and get established in life.
Dad and son became close, Dad voluntarily contributed to university tuition.
It wouldn’t be automatic in my province, but there is provincial law which would allow child to receive a share of the estate, in the form of ongoing support.