Purpose of the hash in your file names is a signal for the browsers to download your files again if they are cached.
Let's put it in this way.
Say that the ng build --prod
hashes remain the same every time that you run it. So you have something like main-1234.js
Now you deploy the app and someone visits your page and the browser will download and cache your files.
After some time, you deploy a new version and you still generated the main-1234.js file. Now the user that visited your site before won't get the new version of your files since the browser already cached it. It will take sometime for them to see the new files if the cache expired and this is usually not the behavior that you want.
Angular does not use or care about the hash value when you're building for production. It actually erases your files under dist
when you run the ng build --prod
. Try it :)