Why would a doctor give nitroglycerin for high blood pressure?

Not usually. Nitrates are vasodilators but are usually weak BP lowering agents ( not to mention the headaches) and would only be used in pts with angina or heart failure pts. They are also used in pts with coronary vasospasm pts. If pts have one of theses conditions and BP is not optimal the dr may increase your dosage in hopes of treating both conditions.