The company probably was using Spring Boot in their production and wanted to find someone already familiar with the frameworks they use to ensure themselves with an easier onboarding. Of course you can’t preemptively learn every framework out there but chances are that you’d find a place to use the ones you already know, especially if said framework is popular. The alternative you ended up with was a company willing to test your general reasoning and train you on their SW stack. It’s great to have variety and the problem with leetcode is that standardized testing that doesn’t really test for anything practical but for which you have to put in months of preparation.
I can't preemptively learn every framework that someone might ask you to use in these practical assignments, but I still think that I'm a fairly strong candidate (let's say top 10% of my graduating class).
I ended up at a company that asked more generic (but harder) questions that I could actually answer.