Companies do deduct it from CTC, but this is not the right approach or a good company HR approach. Please refer to the Payment of Wages Act and first see what deductions are called and the legality of deducting any sum from the salary, its maximum percentage, and if under cooperatives then how much. This will give you a basic idea.
Now, deductions are accumulated for the fund, which must be a registered fund, but as such, GP fund is not a fund where the deductions can be stored; it's not legal.
And you don't have to think of rocket science, just imagine how an employer can ascertain what will be your last pay's basic + DA, on which the gratuity sums would be deducted. The funny thing is, suppose your gratuity is less than 10 lakhs, and you don't have to pay the taxes, that's what statutes say. But see if by adding such a monthly gratuity amount to CTC, you somehow fall under taxable income, then you will have to pay tax each year until you resign and finally get the gratuity. The employer will seek tax relief by showing different heads of such unlawful deductions. That's exploitation of employees.