Better races that I've been to had an obstacle or section, where spectators gathered to see the action close up. For example, one course had racers going down through a sand volleyball pit. The pit was down in a depressed area surrounded by grass and spectators gathered on the grass to cheer on the racers as they went through. Spectators were putting dollar bills in beer bottles and taunting the cyclist to get the money as they went through the sand. Too much fun for racers and spectators.
Another course had a DJ set up on the back side of the course, far enough from the start finish to avoid interfering with the announcer at the start/finish line. Lots of spectators enjoying the music and racers getting beer handups as they go by. It was quite the party scene for a few hours.
Lots of variety in the surface (grass, pavement, dirt, sand) and terrain make a good race. Most of the races I've been to are held in a public park or fairground and use the features there (stairs, horse race tracks, levies, even a BMX track) in the course. Also, races can be held day or night. Night races under the lights are fun too.
Just don't design in too much sand. A couple of sandy spots are good, but long stretches of sand are just plain mean!
Best event I raced at was a wet as hell park in the middle of no where. It rained all week long and cleared on day of the race. Sun was shining, course was wet and tough. Lots of standing water and deep puddles. Mud was sticky and the grass was long. Getting around the course took every ounce of energy you had. The racing that day was epic.