It's not an "annoyance", it's a crucial security feature. But anyways, cahva already said - the shell script runs as the user calling the webserver, NOT as who the file is owned by. So, user www is who starts the webserver, say Apache, and then Apache (running as www) access your script which is owned by root. However, since it's user:www accessing the script, that's all the permissions it has to run - NOT root permissions, because permissions for executing files are based on the user's permission levels.
Think of it as calling rm -rf /; as a user - sure, you can call it, but you can't delete everything, because you aren't root - the script runs with YOUR permissions, not root's.
How you over come this, now, is come up with another solution - cavha suggested a mysql table to be checked by roots cron job. That's one way.
You could also possibly issue a sudo or su command to elevate the webserver's permissions while executing that script, but I'd recommend against that, personally.
You could also find a different way to do it - instead of calling it from a php script, maybe use a cron job. Personally, I think cahva's solution of using a database and a cron job is pretty cool.
You could also give the webserver root permissions, I suppose >.<