Yeah this is exactly the issue I have with it. I think something like HDCF makes sense because you can designate "high danger" locations and just lump any shot in that area in that group. But how you go from that to converting that to an "expected goal" is something that just isn't shared and should be more heavily scrutinized.
It's not only from the aspect of "how do you calculate that function?", but it's also from the aspect of "the league is constantly evolving". The league today is fundamentally different than it was even 10 years ago, so if you're using a probability function based on data from 10 years ago, it's a flawed system.
You need a large enough sample size to be able to be confident in the function, but going too large of a sample size brings in data that isn't reflective of hockey today. It's a very valid question to ask if there is even a way to come up with that function and have it be legit, it's entirely possible that you're including non-reflective data by the point where you have a large enough sample size. If you need 5 seasons of data to have confidence in the function but goal data is only reflective from the last 2 years, how can you make a good function?