The official answer is in an FAA FAQ:
The FAA does not publish actual knowledge test questions, in part
because at least two independent studies indicate that publication of
active questions could negatively affect learning and understanding,
as well as undermine the validity of the knowledge test as an
assessment tool.
The agency does provide sample knowledge tests on the
FAA website. The questions in these sample tests are intended to help
applicants understand the scope and type of knowledge that will be
tested to qualify for the target certificate or rating. The goal is
for applicants to devote their efforts to mastering the fundamental
aeronautical knowledge necessary for safe operations in the National
Airspace System (NAS) rather than to memorizing specific questions and
answers.
The questions that you may have seen and studied in
commercially-available materials have been developed by test
preparation providers for similar reasons – that is, to enable
applicants to study concepts and practice calculations specified in
the 14 CFR part 61 “aeronautical knowledge” requirements for each
airman certificate or rating. These are not, and should not be
represented to be, “real” questions.
In some cases, unscrupulous test
preparation providers have sought to obtain actual test questions by
overtly or otherwise encouraging knowledge test takers to share
information about actual questions and possible answers immediately
after taking the knowledge test. The FAA has taken action against such
companies. You should also be aware that an applicant’s participation
in such practices could be a violation of 14 CFR part 61, section
61.37
The unofficial answer is that third-party study aid questions are extremely - or suspiciously - close to the real test questions. At least one provider even guarantees that they're the same. Clearly that's only possible because providers are getting the questions from somewhere, but I imagine they don't want to talk much about it.