The surgical joining of two structures that are not typically connected. An anastomosis is performed during surgery and may be done to repair a defect, to make the anatomy functional again after tissue is removed, or to make treatment possible.