Every few months someone says the island was purgatory. The finale says the opposite, out loud. In the church, Christian Shephard tells Jack that everything that happened to them was real. The "sideways" world of season 6 is a place they made after their deaths, each at their own time, to find each other before moving on.
The island years happened. People died there for real. The sideways is the epilogue, not the explanation.