Welcome to the Apple Support Communities. I can definitely understand why you'd be concerned about a setting that appears to adjust itself, and judging by the topic of your post, you're already on the right track to fixing it. It sounds to me like auto-brightness as well, so making sure that's disabled would be our starting point. Here's how to do that:
Adjust the brightness on your iPhone, iPad, or iPod touch - Apple SupportAbout brightness levels
iOS devices use an ambient light sensor to adjust brightness levels based on the light conditions around you. The sensor lowers brightness in dark locations and raises brightness in light locations. The auto-brightness feature is on by default.
When auto-brightness is on, you'll notice that your device's brightness slider moves according to changing light conditions.
In iOS 11, you can turn auto-brightness on or off in Settings > General > Accessibility > Display Accommodations. In iOS 10 and earlier, go to Settings > Display & Brightness.
You should check the article linked above to make sure that you don't have True Tone enabled either (assuming it's compatible with the device you have), as this can also change the appearance of your display to match ambient light.
I hope this gets your iPhone back to the way you want it, but let me know if it doesn't so we can keep working on this.
Cheers!