The problem with the analysis here is that it's being made as if the text (attempted dunk / goaltending) is what is actually happening in the engine. What instead is likely happening (I wish I remembered where I read this) is that the engine calculates it's an inside shot attempt that is goaltended, and then one of the inside shot text keys is selected at random. It's the same as the much more common case of a shot being blocked and then going out of bounds or being reported as an airball, in either case, ending up with the defensive team.
The long and short of it is that it's not that these are points that shouldn't be scored, it's that the description is wrong.