I was wondering why the - 2 as I have seen this at a few places already.
That's because each chunk has room for the edge terraininformation (2 adjacent blocks) of its neighbour chunks (it's necessary for terraingeneration and faceculling). On the one hand it's necessary to generate all chunks at the "end of your view distance" without unnecessary chunk requests from the server, on the other hand it's due to performance reasons (adjacent block lookup is much faster compared to accessing a different chunk, though there is a tiny memory penalty, but the result is worth it^^).