Nested tickets are NEVER illegal. It's just against some airline's rules because it lets consumers get around their Saturday night stay requirement.
If I was travelling out of my own pocket, I would definitely use nested-tickets. For work, I stay legit since our corporate travel also discourages gettting around the Saturday night rule. They recommend buying a one-way to your destination (ex. ORD-SFO), then round-trips (SFO-ORD) for as long as you need to commute between the two cities and just drop the last return coupon(s) when you get back to your origin for the last time (ex. ORD, discarding the ORD-SFO return).