Just like any other garment. There isn't some magical number - you'll notice when some part of it starts to wear out. Is the elastic in the fabric deteriorating so that you can see the little ends of elastic strands poking through? Is the chamois delaminating? Are high-friction areas starting to get see-through, and if so, are they areas like the inner thigh where no one else will notice, or places like the butt-crack and pubic bone where you really don't want other people looking in? Not an issue with bibs, but does the waistband still have enough stretch to keep the shorts close to your body?

Those are the only places my shorts wear out ... maybe someone else has more wear areas, but it's not something you aren't going to know about and accidentally forget to replace your shorts! "Not staying put" absent some obvious sign of wear is probably more a change in your body than it is in your shorts.