It actually turns out that if you instantaneously switch the positions of two particles, there is no physical reason for the wavefunction to remain the same. When people talk about statistics they have in the back of their mind a slow (adiabatic) process which switches the two particles.
Let me give you a simple illustration.. you have two electrons sitting in a 2D plane, localized at two points, and we have total incoherence (wavefunctions do not interfere). Now imagine that you slowly rotate both electrons about the centre of the line joining them by 180 degrees clockwise, so that the two particles have their positions swapped. As you observe, if the particles are truly identical then the physical state of the system has not changed. However since the system has undergone an adiabatic process, it can actually acquire a phase factor. Now imagine that you rotate the electrons again by another 180 degrees clockwise, so that the process has completed a full loop. Then the system has acquired double the original phase factor.
The phase that a system picks up when it undergoes adiabatic evolution around a full loop is called the Berry phase, and there is a famous theorem that says that this phase is determined entirely by the number of topological singularities enclosed by the loop. When you adiabatically vary the system, you drive the parameters (in this case the positions) around a "parameter space" (in this case, two copies of the 2D plane, one for each electron), and if there is a topological singularity in this space, what people sometimes call the monopole charge, then the Berry phase that the system picks up can be different to zero (or an integer multiple of 2pi).
If there are no topological singularities, that is, there are no monopole charges penetrating the 2D plane, then the system picks up a phase of 1 when it goes around the full loop. That means the phase it picks up around hte half-loop where you simply exchange the particles is either 1 or -1, corresponding to bosons and fermions.
If you have two electrons with Coulomb repulsion, then there is indeed a topologically singular point: when the two electrons are sitting at the same point, their Coulomb repulsion becomes infinite. You can imagine that you have one electron fixed at one point and you move another electron around it in a circle. Each time the second electron goes around the first electron, the first electron acts as a "magnetic monopole" if you like and the electron picks up a phase (the geometric phase). So in 2D, it turns out that we do not have fermions or bosons at all, we have anyons, and the phase factor that the state acquires when you adiabatically exchange the positions of two particles (what is called the "statistical phase") can be arbitrary.
In 3D, you can always deform the loop so that it avoids the monopole, so the Berry phase you pick up when you move one particle around the other is always equal to 1. The Berry phase you pick up when you simply swap two particles is always equal to either 1 or -1, so we haev fermions and bosons.
In 1d, it is impossible to swap two particles without bringing them close together, if there is an interaction between the two particles then we do not have statistics at all.