They weren't that far off. Most were hovering around a tie with a margin of error of +/- 2-3%.
Trump won many of those states by 2-3%.
Yes but when the result is always skewed to one side then - even if the result is within the margin - the predicted mean is wrong.
Otherwise the real result would be distributed around the mean within the margin of error.
There is some bias and the polls did not correctly factor that into their statistical model.