The Schengen Zone only covers immigration controls, whilst the EU is effectively a customs union. Therefore, you do not need to pass through customs when travelling between a Schengen and a non-Schengen EU country, but you will need to pass through immigration controls (e.g., Bulgaria to Germany or vice versa).