In order to understand the Sacred Timeline, you need to know about Kang the Conqueror and the Multiverse of Earth-199999, also known as the Marvel Cinematic Universe within the greater Marvel Multiverse. Note that there will be spoilers for Loki in this post, and especially episode 6. There is also a lot of this that was explained in writer interviews.
In the backstory for the MCU, there was in fact a multiverse, where every choice someone in the Earth-199999 universe made created a new timeline in this multiverse. Then, in the 31st century, an Earth scientist named Nathaniel Richards in each of these timelines discovered a way to travel between these universes. Many of the Richards were friendly, but there were also conquerors and tyrants, who wanted to conquer these new timelines and subjugate them. These variants are what's known as Kang the Conqueror, and they started the Multiversal War.
At one point, there was one variant of Nathaniel Richards, He Who Remains, who managed to control Alioth and used that power to take out all other variants of himself and establish a small group of timelines where Kang the Conqueror never existed and thus could never start the Multiversal War. This small group of timelines is called the Sacred Timeline, and it's that group what's the Time Variance Authority is protecting. So in effect, the TVA doesn't block ALL timelines from branching off from the Sacred Timeline, just those that would lead to Kang The Conqueror existing and starting a new Multiversal war. This was explained in a writer interview: https://screenrant.com/loki-show-kang-sacred-timeline-michael-waldron-response/
Now, there are 2 ways you could go from here to interpret how What-If fits into this system.
The first one is that these What-If scenarios are in fact just parallel timelines that the TVA doesn't see the need to prune, because they won't lead to an additional He Who Remains existing to start the Multiversal War. So in this context, the TVA won't intervene because it's still part of the Sacred Timeline.
The other interpretation is that after He Who Remains died, it collapsed the powers of the TVA to keep the Sacred Timeline pure across all of time and in effect allowed for timelines where Kang the Conqueror exists to split off from the Sacred Timeline. So now that the TVA no longer controls time and tries to keep the Sacred Timeline pure, these What-If scenarios are from these branched timelines that can once again appear all over the Sacred Timeline.