Faulty battery. Get it replaced under warranty if you can.
I'd say about 15% or higher is acceptable without turn off to Apple logo issue.
I've seen some pretty well worn used batteries few years exhibit this issue.
The problem right now in the iPhone batteries market is that there are a lot of aftermarket and refurbished repackaged batteries that have on average 60% actual battery like left. So on some refurbished batteries they don't function properly around 40% and lower.
You can still get good quality batteries but you need to be careful from where you get it from. E.g eBay is full of aftermarket or refurbished iPhone batteries.
I know iFixit is a reputable seller as they will go above and beyond when it comes to replacements and customer service. If the part comes DOA (Dead on Arrival) they will cover you.
What happens with refurbished batteries is that they are repackaged, the small board at the bottom of the battery the gas gauge board it's called replaced to reset the battery information to make it look new when reading battery information from 3utools or coconut battery for example.