Notice period is an important aspect for business continuity because if there is no Notice Period, an employee can leave the organization anytime leaving the work dependant on them unfinished. This would mean lot of issues for the company in case there is no replacement available.
Notice period gives the company this extra time to find the replacement for the resource so that the business or project is not affected. This is also not only from Employer's perspective only but in case an organization asks an employee to leave/quit, the same period gives employee a time to find a new job.
Many a times high Notice Period may lead to lesser attrition but it depends on industry to industry.
In IT Industry, Notice period in service companies in India are in range of 2-3 months.