Actually, they do have rules about on field behavior and choose to ignore them. Now they are paying the price...
But the NBA is specific
According to the NBA’s guidelines, “players, coaches and trainers
are to stand and line up in a dignified posture along the sidelines or
on the foul line” during the playing of the national anthem.