The main idea of abstracting SQL queries from the framework is to perform implementation irrespective of the data source that we will be using in the application. We might think that creating raw SQL queries must be defeating the very purpose of EF Core's existence. There are a few valid requirements that might need raw SQL instead of leaving Entity to do the work for us.
It could be anything, something that could not be achieved through LINQ queries or performance that was not optimized by Entity-generated queries. The reason could be anything, but, at the end of the day, we all work for an outcome, an optimized outcome with better performance. We might be ready to take extreme measures in not aligning with the framework/APIs, provided the reason is substantiated more than the API usage.
We could perform basic SQL queries or execute stored procedures...