Hiding your framework does not guarantee security. But it makes successful attacks less easy.
Even assuming that all your software is up to date, if you broadcast the fact that you are using Technology vX.Y.Z and a security problem with that version is found, attackers have a window of opportunity between the disclosure of that vulnerability and installation of updates.
For a professional, security-conscious organization, there won't be any unnecessary services exposed to start with, and they will be able to patch vulnerabilities in their software very quickly. The biggest part of this is knowing that there is a problem, i.e. subscribing to the appropriate mailing lists of the software you are using, and keeping up to date with CVEs.
Minimizing unnecessary information about your software versions also reduces your risk. But it doesn't actually prevent anything. Be aware that attacks may be carried out in an automated fashion, and that IP ranges of hosting providers and cloud services are an especially promising target. Note that there are search engines like Shodan that can search for specific technologies and versions if these services disclose themselves via metadata.