Why was my iPhone making a fire alarm-like sound?

So I'm on my laptop playing League with headphones on while I'm on iFunny in the comment section when the [fire] alarm-like sound started to sound. I looked down at my phone thinking it was a video, but I realized I was in the comment section so the sound couldn't have been coming from my phone. So I turned my phone off. I then look around in an attempt to find the source of the sound. I looked at the fire alarm in my room, but the alarm wasn't there (we needed to get new batteries). Then I looked at my DS and it wasn't coming from there or my laptop. So I grabbed my phone and put it to my ear. The sound was coming from it. I was afraid because my phone was off and it wasn't a notification sound. In fear that it might explode, I put it at a distance from me.
My best explanation for the sound was a fire alarm sound that kept repeating. (No it was not an amber alert noise either).
Why was my phone making that noise? Should I be worried?
Extra Info: I have an iPhone 6 and it was not charging when I was using it.

Hi so it has been programmed in to make that sound.

IT CAUSES BY FEDDBACK OSCILLATION DUE TO BOTH ITS MIC AND SPEAKER ARE ACTIVATED AT THE SAME TIME BY YOUR MISTAKE.

You did not tell us where you are located. It is likely an Amber Alert was issued.

Turn the ringer down and shut your phone down.

The same thing just happened to me, it wasn't a government alert and I was able to turn it off by swiping up and turning it off like music. It had some weird URL as the title. Does anyone know why this happens? I was on the iFunny app as well if that helps

My phone has done that twice now. It sounds like the fire alarm going off. The first time it happened it just stopped on its own, but the second time I had to shut off the phone to get it to stop.

It just happened to me on my 6s while I was in the sudoku app. I had to shut it off.

This has been happening to me every time I'm on the chine app