A PG like Fred could be the vet that really rounds this team together to be a real competitor. It's risky to build up a young team with minimal veteran presence, and Fred is a proven leader that's won a championship. Magic have space to re-sign him especially when offloading some undesirable contracts.
Raptors aren't competing right now and this allows them to build around Scottie-OG-Pascal with another pick to help build up the depth