Quite often you see celebrity and professional chefs taste the meat or sauce from a dish that is clearly not fully cooked. Is there a different length of time you should wait before sampling an uncooked dish (e.g. beef versus chicken) and do chefs ever suffer food poisoning for the sake of their art?
More opinion than a back up factual answer, but I knew a Cordon Bleu and CCI trained chef who stated one of his first days in professional training he was required to eat a raw chicken breast. The reasoning: He was expected at all times to have a kitchen that was clean enough and product that was fresh and high enough quality that he could do so. That if he was not confident enough that he would not get sick from eating something raw, that her was never to serve it to someone else. No matter how diligent he was, there would be times that he would serve something under-cooked or cross contaminated to a customer, so he had to have that confidence that the odds of them getting sick even with a mistake were low.
Using this level of product and practices costs more, and is part of the reason we have to pay more for items from a high quality place. To protect themselves they must do all they can to protect you. In normal practice though, they are taking very small tastes. They have trained tastes and can recognize spicing issues and such with a small enough sample to not be high risk. Sure, it can happen and they may end up sick, but the odds on any given sample are low and it is their profession. One of the challenges at home is for us to also learn to make those judgements in taste from a small sample while limiting the risks of cross contamination. I would not eat a piece of raw chicken because I don't have access to the quality and assured freshness that say a Gordon Ramsey has. Notice though, he tests under cooked, but does not serve that way and will not eat that way when served. In my kitchen I will taste test repeatedly for fear of killing flavor with too much salt for instance and can usually tell with a pretty small taste. I do not tend to hesitate even though I have a low tolerance to tainted food due to having gotten food poisoning more than once as a kid.
Where many of us especially struggle compared to a quality professional though is knowing how flavor will develop as the dish continues to cook, such as tasting early in a sauce. In this case it takes a lot of practice to mentally extrapolate how the flavors will finish when tasting early, and yet that is when you prefer to have many flavors added so the meld together better. That you can only gain through practice, which means even more tasting and even more need for care in selection high quality items and in avoiding contamination.
Let's say it this way:
Celebrity chefs on TV very often make mistakes regarding kitchen hygiene. There was a review of 100 episodes of different cooking shows and the chefs in those episodes made a mistake regarding kitchen hygiene every 50 seconds on average! They also found that people who watch how celebrity chefs cook, make more mistakes regarding kitchen hygiene than those who watch professional cooking videos.
So do not assume celebrity chefs behavior can be safely copied.
When to sample something is tied to the question what to sample. The boiling stock is something else than the chicken meat inside - because they have different temperatures. You can (only) safely sample what is also safe to eat.