The first part of Larry Niven’s Ringworld explains why not. The structure requires materials so strong that even well-read sci-fi writers need to put in placeholder magic materials in.
I think if we could, we wouldn't need to. A ringworld has most of the downsides of living on a planetary surface plus many more. For the same investment in materials and energy you could build a fleet of orbiting habitats that wouldn't be vulnerable to the kind of centralized threats a ringworld would be.
The sphere is merely a Gedankenexperiment, taking some factors to their logical extrema. Nothing wrong with that.