Keywords were the primary means of explaining to search engines the subjects you were addressing prior to semantic search. In general, the more you used the keyword in your content, the more important it seemed. Unfortunately, this led to practises like keyword stuffing, which were intended to fool the search engine but actually harmed the user experience.