They use this method because it's as effective as most other methods.
Warts are contagious because they are caused by a virus.
Most of the time, warts go away by themselves because your immune cells and proteins eventually learn how to kill the virus that causes warts. When a doctor freezes a wart with liquid nitrogen, a blister forms and the virus can remain in the blister fluid to start a new wart as soon as the skin heals. To prevent the wart from recurring, the doctor has to remove a margin of normal skin around the wart. The most difficult warts to cure are those around fingernails because it is difficult to destroy enough tissue to get rid of the wart. The most effective way to cure warts is to use poisonous chemicals that are picked up by the wart in far higher concentration than by normal skin.