Detroit needs a clearer backup center than Beef Stew, who's more of a stretch(ish) hybrid PF/C. Robert Williams is $2.6M/yr cheaper, on a shorter contract by two years, but three years older with an injury history that's concerning. But at 18-20 minutes per night, he'd be a perfect backup to Duren. He'd also bring in additional veteran leadership, having been to the Finals. This move also helps balance the rotation. They'd be a sneaky good team that could challenge for 40-42 wins, and have a real puncher's chance to make the playoffs. They also net two SRPs, making the risk vs reward work.
Portland essentially moves Time Lord for a younger stretch(ish) big, who is a much better fit next to Ayton and Clingan. He's $2.6M/yr more expensive, on a contract that's two years longer, but being three years younger, he fits Portland's rebuilding timeline. While being able to chip in 18-20 minutes per night. And giving up two SRPs is worth it.