This question has come up before and there doesn't seem to be a great explanation, but basically, there is a substantial difference in electronegativity between Oxygen and Hydrogen which is much greater than Oxygen and Carbon. In the alcohol, the electron from the hydrogen is drawn very close to the oxygen and the one from the carbon is to some extent as well. In the ketone, there is no hydrogen "donating" (probably not the best word) an electron to oxygen, so the partial negative charge on the oxygen is not as great. But tbh, this is probably a good thing to just memorize.