When two words have semantically or syntactically similar meanings, the words are represented closely to each other in a word embedding space.
even when the prediction is not exactly correct, the predicted word might not be so bad, if the estimated word is very close to the target word in the embedding space like 'programming' and 'coding'.