The red bracket represents the smallest interval that encompass 50% of the data.
The two quartiles represents the first 25% of the data from each side of the mean encompassing for 50% of the data but this is not necessarily the densest region.
Imagine a skewed distribution that has a very long tail on the right. The median might be much higher than the mode and be fairly high. In consequence the 25% quartile will eventually include the mode but the right quartile will be long in a very sparse space. The densest region necessarily include the median (exception in @whuber's comment below) and one of the two quartile.