Why is ΔS the same regardless of whether a process is irreversible or reversible? Why do we take the entropy change of the system to be the same in both irreversible and reversible processes? What is the idea behind this?

It would be nice if anyone could give me an example with some data.
In an irreversible process, we can't use the integral of dQ/T to calculate the change in entropy between the initial and final states of the system, because there is entropy being generated within the system (as a result of mechanical energy dissipation to internal energy) which the integral does not account for.  However, since entropy is a function of state, we can focus on the exact same initial and final states of the system, and devise a path between these two states that does not involve dissipation of mechanical energy, and calculate the integral of dQ/T for this alternate path.  Such a path is a reversible path, and the integral along this (or any other) reversible path gives us the change in entropy.