I'm not sure I see this as a big problem with digitalWrite(). "Your pin is working right as an output because you didn't set it as an output" is fairly understandable. Yes, it's weird that the pins sort of works even when set as an input, but I'm not sure that's a problem that requires changing the behavior of digitalWrite().