Test.startTest() and Test.stopTest() are very useful when your test class hits Salesforce Governor Limits. These methods can be used to reset the governor limits within a test class.
Check the below link for more info
https://www.infallibletechie.com/2014/09/what-is-purpose-of-teststarttest-and.html
Cheers!!!