This trade probably seems crazy, but when you think about it it makes more sense.
Dwight has already said he wants to play with S-Jax, and apparently is thinking about signing their in the off season. They keep the salary they need to sign him (Okur and Humps expiring contracts) and Howards friend. IF they do sign Howard in the off season, not only will they not need Lopez at C, they wont have the money he will probably ask for. Essentially, they get a much better chance of signing Howard, by trading away the player he would replace.
For Bucks: S-Jax is playing terribly, and apparently they desperately want to move him. There were also rumors early in the year about trading Jennings away. They trade Jennings to get rid of their head ache in Jackson, as well as getting a great young big man, and a young replacement for Jennings in Farmar (who is only 25) as well as a great off the bench scorer/expring contract.
For Toronto: We trade Barbosa and Bayless, who people do not think are part of the rebuild, and get a great young PG who is friends with Demar. Stevenson is just for salaries to work out, and expires at the end of the year.