Why would you use anti-embolism stockings? My bedridden grandmother was given anti-embolism stockings. Why would she need these?

To reduce swelling. You stated bedridden, and your grandmother probably of age greater than 60? Bed ridden stasis in veins age surgery cancer coagulopathy( clotting) may all lead to blood clots in the limbs and clots travelling to the lungs(embolism) there are multiple parts of therapy/ prevention and stockings are a part of that list.
Anti-embolism . Anti-embolism stockings are tight graduated stockings that help with venous blood return to the heart. In bedridden patients, venous blood can accumulate and become "stagnant" in the deep veins of the legs due to lack of activity. This can predispose to the development of deep venous thrombosis (DVT) or blood clots in the deep veins of the legs. Dvts are potentially dangerous since they can dislodge from the deep veins of the legs and float into the heart and lungs. They can then cause a problem called a pulmonary embolism, which is a life-threatening condition if untreated. Wearing anti-embolism stockings is therefore a simple way of trying to prevent a potentially life-threatening condition in patients who are predisposed to it, like your grandmother. Dvts and pulmonary embolisms usually have to be treated with anticoagulant medications, or blood-thinning therapy for a prolonged period of time.