Some mystery have priority over others aside from position.
Interrupt > others when there is something to interrupt
High cost > low cost
And, I believe, one of them is Barrier > non-barrier.
I don't think I have ever seen a barrier to be not cast when possible except in the case of interrupt in the many obviously AI opponent's I've fought in survival. No hinata, no fire main, no kabuto, always the sasuke(being the most common)
So it probably isn't a bug, thou it would be nice if we can set priorities ourselves.