Older version of AEM/ CQ, Jackrabbit index the content by default. But Oak doesn't index content by default. We need to do it like how we do indexing for a DataBase.
Why do we need to index?
When a JCR query gets executed, usually it searches the index first. If there is no index, the query executes for the entire content. This is time consuming and an overhead for the AEM. But keep in mind, if the frequency of queries executed are less, we can ignore the indexing.
Let us understand the Oak and AEM indexing in detail here.
In fact, there are three main types of indexes available in Oak