One of the duties you may encounter as an officer is to protect a crime scene. It's not exactly exciting work, but it is important.
Generally speaking, you should always be considering the integrity of any scene that you are investigating. Not every call you attend will turn out to be a crime, and not every crime will have a scene which requires it to be protected. However, there will be some serious incidents which will require the area to be cordoned off to be examined forensically.
Forensics may have to photograph or videotape the area, collect items found in the scene, dust for prints, swab for blood etc etc...
You can use Police tape to tape off the area, but that more than likely that won't be enough. People can be extremely curious, and sometimes flat out dumb and ignorant. If an officer is not standing within sight, you will find that some people will try to wander into the area to see what is going on.
Take a look at the video below:
That can not only make it more difficult or forensics to do their job, it can give the defense something to harp on when and if the case ever goes to trial.
Officers who are tasked with standing by to protect the location also have to maintain an entry log. It's basically a record showing that only authorized people have entered into the scene.
Officers protecting the area are often bombarded with questions from curious onlookers who always have to stick their noses into it.
And it's not just onlookers. Often times it can be the news media who are looking for some information, or a sound byte of some sort. You have to maintain professionalism because you sure don't want to be captured on tape being a mouthpiece - and on the 6 o'clock news.