My understanding is that the PYTHONSTARTUP file is intended solely for use in the interactive prompt. This page is a little ambiguous, but does seem to support that: https://docs.python.org/2/using/cmdline.html#environment-variables
This is happening for me on OS X 10.11.5, with brew installed python 2.7.12, python 3.5.2, ipython 5.0.0.
More details here: http://stackoverflow.com/questions/38781067/why-is-my-pythonrc-file-being-run-in-non-interactive-programs/38814182