It is necessary because of the base pairing between the desired gene and plasmid
Explanation:
Restriction enzymes are enzymes that recognize the specific DNA sequence-restriction site, double-stranded cut DNA and produce ends with a single-stranded overhang. The overhangs of the plasmid can stick together with overhangs of gene of interest by complementary base pairing. Joining of ovarhangs is done by the enzyme DNA ligase.