I was almost put off racing again after my first 10k. I was slow (82 mins), but the race was marketed as one you could 'walk, jog or run' so I was suprised to be running on my own at the back. This wasn't the best experience, but I was mostly bothered by the attitude of the marshalls and organisers. Several times I had to shout to them and ask the way, as it wasn't clear and they were too busy chatting/on phones to pay attention to me approaching. A number of marshalls asked me if I was the last and could they leave now etc, making me feel like I was holding them up. I got lost twice because some had left their posts before I arrived. I overheard the organiser saying 'if she's not the last I'm going anyway' as I crossed the finish line.
Fortunately I gave it another go, partly due to encouragement on this site. And I'm glad I did. I've run two great races since, with good marshalls and organisation, and it's made such a difference.
I'd expect a marshall to stay until the last person or time limit, pay attention to runners during that time, and make sure runners are safe and go the right way. Many of them do more then this, encouraging people to keep running, verbally supporting them over tricky bits etc, and that's a bonus.