Nicky,
It's all pre-planned. Billing is negotiated beforehand. Sometimes actor's roles get edited down for various reasons and they may opt for "no billing" at that point. Or they are doing a small role as a favor or a lark as a "cameo". Sometimes, they can't get the billing they want: Main Titles, Separate Card, Third position, or an "AND" in Last Position--so they take "no billing".
The biggest role to ever go "unbilled", that I can remember, is Bill Murray's in "Tootsie". He was one of the "Stars" and NOT billed. I don't exactly know why.
"Paid Ads" are negotiated in advance also; (the names that appear in the print ads), although a lot of time the positions are left at P.D. (Producer's Discretion) except for a superstar like Tiny Tom Cruise. He's always gonna be first unless he goes "ensemble" (looks good on the resume) in a "Magnolia" type piece, where he's probably billed alpahbetically (as in ALL Woody Allen films). In Woody's movies, Caroline Aaron is billed before Woody or anybody else.
Who wasn't billed in "Enemy Of The State"?
"Lost inside adorable illusion...."
Bookmarks