Yes, this can happen after 12 months of inactivity for free accounts. Policy: https://help.yahoo.com/kb/SLN2018.html
For context, Gmail has a policy which allows for deletion after 2 years of inactivity: https://www.google.com/gmail/about/policy/
I’m sorry the service didn’t meet your expectation, but for others here who are curious, there are some options for keeping email storage active! These days there are paid Yahoo Mail accounts available which retain email for as long as you have the subscription active. (Or you can log in once a year with a free account.)
You can also use a IMAP app to save a local archive of all of your email. This works for all accounts, even free ones! More: https://help.yahoo.com/kb/SLN5033.html