Bayes' Power for Explaining In-Context Learning Generalizations