The BPT Diagram in Cosmological Galaxy Formation Simulations: Understanding the Physics Driving Offsets at High Redshift