Article 22 preventive detention:

Preventive detention means detention without trial. Punitive detention is to punish person for what he has done and after he is tried in courts for the illegal act committed by him. Generally preventive detention is resorted to in situations that the possessed evidence by authority is not sufficient to make a charge or to secure conviction of the detenu by legal proofs but may still be sufficient to justify his detention on the suspicion that he would commit a wrongful act unless he is detained.

Preventive detention is unknown in the USA or UK in times of peace.
The Indian constitution authorizes the legislature to make laws providing for “preventive detention” for reasons connected with the security of a state, the maintenance of public order or the maintenance of public supplies and services essential to the community, or reasons connected with Defence, Foreign affairs or the security of India. The constitution however, imposes certain safeguards against abuse of such power(22(4)-

(7) Following are those limitations:

• Government can detain a person under this clause only for maximum three monthsthereafter, it need to obtain a report from an Advisory Board who will examine the papers submitted by government and by the accused to justify the detention.
• Detained person must be informed of the ground of his detention, excepting facts which the detaining authority considers against the public interest to disclose
• The detained person must have earliest opportunity of making a representation against the order of detention

Legislative power on preventive detention is in concurrent list of constitution that is it is divided between union and states. Detention due to reasons connected to Defence, Security of India and Foreign affairs comes under union whereas, maintenance of public order, production and supplies essential to community related preventive detentions are covered under legislature of the states.
Article 22 remains in the Indian constitution as necessary evil.