The main purpose of using keywords in SEO is to help search engines understand the topic of a webpage and to match the page to relevant searches. When a user conducts a search on a search engine, they enter a query, which is a combination of keywords or phrases.