You should ask software developers about it. It is matter of predefined rules/routines. In some cases also part of AI...