The simplest explanation could be one of two things:
Simple limited resources - finite time to QA and test. This is always something to consider - for each device that runs code, you need to provide devices to the coders, test during development, test during QA, support over the 2-3 year period that OS will be under mainstream support, etc... Basically, technically feasible features lie strewn across the cutting room floor all the time due to the fact that resources are not infinite, timelines exist, and budgets exist.
The framework Apple uses to implement this simply doesn't support or hasn't been written for the older hardware. Yes - you can write code in the basic 1+1=2 for just about any chipset or framework. My educated guess is night shift is written in metal or a lower level API. Apple's documentation explains the hardware needed to support metal and OpenGLES v 3.0:
If you look at all the OpenGL2.0 and non-metal devices that now don't support night-shift it might be a compelling technical reason to not ship that feature without the metal/3.0 capabilities of the graphics API and hardware support to back up what the code describes.
My hunch is solidly in Hardware + API limitation camp, but it's worth stating that there is a large cost to every change and every decision in the iOS ecosystem at this point with most of the 1 billion active users of Apple products being iOS users.