Incursion Sentry function

So anyone have the down low on the Sentry function. Sometimes it will attack me even when minions are attacking it. I know attacking a champion within range of the sentry will pull aggro but some instances it doesn’t make any sense why I’m being targeted.