L293D motor shield power sources

But why when I connect the 4xAA batteries to the shield and the 9v to Arduino does the 9v battery get drained?