Because your iPhone is a single user device with a passcode that should not be known by anyone else. You can change your Passcode here:
Set a passcode on iPhone - Apple Support
There is actually quite a bit of damage that can be done with a child having access to your phone other than viewing the Hidden Photos. It also authorizes them to make any purchases on your device and it is possible that you will be locked out of your phone if they are able to enter a different Apple Account on the device. The passcode protects much more than your hidden photos. It is not recommended that a child knows your Passcode.
If you want a child to use a single app on your device, then it would be best to use Guided Access where they are unable to exit the current screen and do not need to know your Passcode.
Use Guided Access with iPhone, iPad, and iPod touch - Apple Support
You are welcome to send feedback to Apple here:
Product Feedback - Apple