Under normal circumstances, games include any number of gentle reminders for sideline personnel to "give me the sideline, gentlemen", as people tend to drift forward into restricted areas. Hopefully (and very often thankfully) sideline personnel respond positively to these reminders, and the beat goes on, without need for further action.
When these reminders prove ineffective, usually because people simply are not paying sufficient attention, a more graphic, demonstrable reminder may be required; thus the "Sideline Warning" punctuated by a penalty flag, and causing the game to be interrupted, attention to be focused on the Referee, who abandons his normal position and pauses to give a specific signal to the offending sideline, which on the initial occassion does NOT impose an actual yardage penalty, hoping to garner a better attentive response from the offending sideline to the matter at hand. (hopes that forewarned will avoid the necessity of additional consequences).
Not a bad idea, for the wing official on the opposite sideline to alert his sideline personnel what is transpiring, as a subtle reminder of the universal need for compliance.