The method (I assume) uses Jordan's theorem, which says that an primitive subgroup of $S_n$ with a cycle of prime order (at most $n-2,$ if memory serves) is either $A_n$ or $S_n.$ You rule out $A_n$ by looking at the generators, you show transitivity by randomly generating an $n$-cycle (of which there are a lot, so it does not take long to find one, there are other ways, too), and you show primitivity by finding a permutation which has a $p$ cycle for $n/2 < p < n-1$ (raising it to a power, you just get the $p$-cycle. There are lots of such, so basically generating a few thousand elements will do the trick. Notice that if, after generating the few thousand elements you DO NOT find the sorts of elements you want, the group is almost surely NOT the symmetric group (but the NO answer will be probabilistic, while the YES answer will be deterministic).

For more on this subject, check out my paper with Pemantle and Peres on invariable generation of symmetric groups: *Pemantle, Robin; Peres, Yuval; Rivin, Igor*, **Four random permutations conjugated by an adversary generate (\mathcal{S}_{n}) with high probability**, Random Struct. Algorithms 49, No. 3, 409-428 (2016). ZBL1349.05337.

IsSymmetricGroupchecks whether a group isisomorphictosomesymmetric group (so may return true even for a matrix group). The functionIsNaturalSymmetricGroupchecks whether a given subgroup is in fact all of $S_n$. But for a subgroup of $S_n$,IsSymmetricGroupfirst invokesIsNaturalSymmetricGroup... The implementation of the latter function is in the file 'gpprmsya.gi', and Igor Rivin's answer seems to be rather accurate: Check transitivity, and try to find randomly a $p$-cycle with $n/2 < p < n-2$. $\endgroup$Permutation group algorithms, Section 10.2.) $\endgroup$2more comments