What is the primary purpose of surgery in medical practice?
A) To provide medication for treating diseases
B) To perform operations to repair, remove, or alter tissues and organs to treat or diagnose medical conditions
C) To offer psychological counseling and mental health support
D) To perform diagnostic tests and imaging for disease detection