Because a framework is basically a set of libraries that work together to help you get to a certain goal.
If there's already a framework that helps you get to a certain goal, it can save you a lot of work to use that existing framework instead of making your own. It can also save you a lot of security issues.
But if your requirements don't really connect to the things existing frameworks provide, you'll have to build your own custom framework by collecting all the libraries you need and making them work together the way you want. Maybe you can make a framework out of it so the next person that has the same requirements as you doesn't have to go through this process again.