Food safety is primarily related to the environments that bacteria live in, thrive in, and are killed in. Temperature and time at that temperature will determine if a bacteria is able to survive. For example, if chicken, or other food items that come in contact with raw chicken, reach an internal temperature of 162F or greater, all salmonella is instantly killed.
In the situation you mentioned, and as JefromiCascabel mentioned in theirher comment, the rest of the food in question is being cooked on high heat so it will reach a high internal temperature as well to kill the bacteria, eliminating the food safety concern.
Another factor would be velocity. The (cold) food gets cooked immediately after getting cross-contaminated by the dirty knife. This means that potentially harmful bacteria do not have time to multiply.
The USDA has a nice document on the time/temperature required to kill certain bacteria and safely eat poultry products.
TIME-TEMPERATURE TABLES FOR COOKING READY-TO-EAT POULTRY PRODUCTS