So, Django was made before APIs were so mainstream, to do APIs with Django, Tom Christie created Django Rest Framework. Then, after some time, he created a new framework with what he imagined would be the best way to build APIs, it was called APIStar. But then he had to deprecate it to focus on Starlette, that has one of the best performances available in Python.
I like to think FastAPI is a spiritual successor to APIStar, applying many of the learnings from it, that uses all the experience in building APIs, and using the best performance available (with Starlette).