Consider how vast the Federation bureaucracy must be to coordinate the activities of a hundred and fifty member worlds. I don't doubt for a minute that there are organizations buried so deep within layers of departmental offices that oversight has ceased to be a real possibility. Even if Section 31 was originally a named section of Starfleet, given the nature of institutions it would not take much for it to develop a life of its own and begin acting independently, perhaps creating private avenues of support. (Think of the CIA selling drugs to fund operations, and think of the CIA and the president: how much power does he have over an organization that thick into secrecy?) The Federation president might be dimly aware of Section 31 as an idea, as a spectre, but not something he can get at directly. Considering the behavior of that organization onscreen in the Prime universe -- I doubt very much the organization would want official knowledge of their behavior. They pride themselves on subtleness, of working in the background and manipulating events. Official sanction would ruin the excitement, the thrill, the accomplishment. What good is manipulation if someone knows you're doing it?
They are presumably organized as a secret society, a brotherhood of sociopaths...a conspiracy. Everyone in it has official roles as Starfleet officers or Federation officials, but they're also members of this network of likeminded officers who coordinate their actions to achieve a common goal. This is just speculation on my part, something I pondered years ago when I tried to do a story in which a Starfleet captain becomes an unwitting agent of S31.
To me this doesn't fit with what we see on screen, certainly in terms of "sociopath". Section 31 act according to the perception they are doing some form of good, not manipulating for individual gain or influence on it's own terms. In many ways they do exactly the opposite, they do NOT seek power or influence per se, merely use it as a means to an end, an end that many would perceive as being fairly reasonable.
In personally think Section 31 fit very well into the trek universe as portrayed on screen, if not as commonly perceieved within the fanbase. The trek universe is not a safe place, the federation is not a utopia any more than Disney World is. It presents as a very progressive society but far from perfect.
To me a lot of the question of their legitimacy would not come from the testimony of Sloan, who is a limited character with an in universe perspective, but rather from more extensive potrayals of their operations, in particular where their funding comes from. Clearly they have access to some fairly extensive top end resources, above and beyond that available to the crews of strategically valuable SF crews.
How those resources become available would tell us a lot, do they engage in the 24th century equivalent of the CIA heroin smuggling program or do they have some other funding stream. Do they siphon off funds from the various departments it's members represent in their official capacities? Do they have something more direct, a black budget sanctioned at some level? Even if we roll with the old "no money in the 24th century" adage, the sort of resources they have available are not commonplace and few have the means to access them without official backing or criminal activity.
We haven't been given much along these lines but to me the fact of S31 being primarily SF officers is unlikely to be a coincidence, it indicates either that at some level S31 IS in fact sanctioned (outside of Sloan's direct sphere of knowledge) or that it's operations draw heavily from redirected SF assets. They operate discretely, but at the highest levels and in a manner that smacks of paranoud confidentiality rather than criminal secrecy.
At the risk of labouring the point any insights gained from Sloans comments are in danger of being over represented. What is canon is the fact of his having made said comments, not their veracity. When a character speaks on screen they do so from a given perspective, based on the information available to them. With an organisation so determinedly avowed to campaigns of misinformation it would not be in fitting to assume its field operativeshave full disclosure, or that such disclosure as they have is necessarily accurate.
S31 may well answer to the President, they may not, my own take is that it would be a very foolish person who could hold that office and not at the very least have some suspicions that they exist.