This provides optimal rendering and indexing for the site. If Googlebot is not allowed to access these files in the site robots.txt, then it directly harms how well Google Algorithms render and index the content that can result in suboptimal rankings.
Can Googlebot render the web pages properly?
Google has created the diagnostic tool is called fetch and render within Google webmaster. The Fetch and render tool designed to allow Google webmasters to simulate how Google crawl a URL of a website.