the symmetry group of a geometric object is the group of all transformations under which the object is invariant, endowed with the group operation of composition
So why does the symmetry group of a square include only rotations and reflections? If you applied a transformation in the square that for example switched the position of two arbitrary points, it would not be a reflection nor a rotation. So why isn't that transformation included in it's symmetry group?

Who says it isn't? In the quoted wiki article we read:
Most generally the symmetry group of an object is just a set of all auto isomorphisms of that object. The word "relevant" is crucial here and in different context it means different things.
If you look at the square as a set then isomorphism = bijection and your example is valid. If you look at it as a topological space then isomorphism = homeomorphism and your example fails cause switching 2 points is not continuous. If you look at it as a subset of some vector space then isomorphism may mean linear isomorphism. If it is metric space then it may mean isometry and so on and so on...