Ethical hacking is a process of deliberately hacking into a system in full knowledge of the system developer or owner to find out flaws and vulnerabilities. Software development companies may have their own internal ethical hacking team or they can also hire external ethical hackers to find out weaknesses, back doors and vulnerabilities in their system or network or data center environment. Because of the increasing threat posed hacking, system compromises and subsequent loss of data and credibility, companies are increasingly using such services to make sure their systems and equipment are sufficiently hardened to mitigate the threats. A whole security industry that does activity such as VAPT (Vulnerability Assessment and Penetration Testing) of the designated system, hardware, software or network infrastructure on an on-demand, payed service basis. There are even individuals that do announced and solicited hacking without any malicious intent.
In summary, ethical hacking is kind of a fire drill to make sure that the system in question is secure and able to handle any malicious threats and attempts of compromise.