Framing near rough in plumbing and sump pit
Your wall plate can easily span that rough-in box. That's not a concern. What is maybe a concern is the location of the rough-in. Doesn't look quite right for a standard tub or shower. The builder may have expected a slightly larger room.

I'm not aware of any rules regarding clearance around a sump pit. You'd obviously want the lid to function properly (even after drywall and any trim) and space for any plumbing. Other than that, squeeze away. Looks like there's plenty of room to the other sides anyway.