Yeah, the grammar is wrong. Sometimes grammatical errors in songs are due to ignorance or carelessness (I recall one song from the 1970s that incorrectly had "could of" instead of "could've"). However, in the case of the Beatles, it probably was a deliberate choice for smoother lyrics ("doesn't" is kind of an awkward word).