My question is, why not 36, 49, 81 or some other square number? Do any historical sources point to how and why chess came to be played on 64 squares in particular? Has it always been so?
Capablanca advocated for a 10x10 chess board. He was concerned that chess was getting played out, that there were far too many draws, so his response to that problem was to create two new pieces and play the game on a 10x10 board with ten pawns and ten pieces.
Eight, being a power of two, makes for an easily drawn board:
1) Start with a big square. 2) Divide that square in half, both vertically and horizontally. (result: 4 squares.) 3) Divide each of the resulting squares in half similarly. (Result: 16 squares.) 4) Divide each of those squares in half similarly. (Result: 64 squares.)
Successively dividing larger squares in half is fairly easy for the eye to do, without the aid of any sort of measuring device. If you want more precision, you can use a string tied around a marker (pencil, chalk, whatever) and a straightedge and make a 64-square chess board with almost as much precision as someone using a high-precision ruler. You couldn't do that for any size of board that isn't a power of two.
Nothing is stopping you from playing chess in a 4x4, 6x6 or 9x9 board. In ancient times people have tried such approaches.
To answer why 64 squares, I have to answer a bit mathematically. Let me start with this:
[Chess, in] its early form in the 6th century was known as chaturaṅga, which translates as "four divisions (of the military)": infantry, cavalry, elephantry, and chariotry.
It says that chaturanga means 'game of squares' and it also mentions 4 divisions of military, where 1 division = 8 pieces (4 pawns + 4 main pieces). So 4x4 = 16 pieces each side. This also means, all in all, a total of 32 pieces in the board (8 in each row).
For 32 pieces to be fully mobile on the board, 36 squares would be too congested and not possible; 49 squares would be still too congested; 64 sure makes sense, and is also the perfect square of 8.
64 is a whole square, so that it is as wide as it is long.
It happens that it is also THE MOST suitable option for a chess game, because:
It is big enough to allow multiple maneuvers and strategical possibilities.
It is small enough to let general guidelines be formed.
The back-rank pieces (2 rooks, 2 knights, 2 bishops, 1 queen, 1 king) also necessitates a 8-row board. If you wanted to make it 81 (9x9) pieces board, you will have to add another piece (an extra queen?). But on such a big board, each game would at least require 30 minutes to finish, if not more. Blitz and bullet chess would not be an option.
IF there were 128 or 32 squares, you would be asking "Why this number of squares? Why not its double or half?" It is like asking, why does a right angle contain 90°?
We should ask the inventors :) I think that they were playing another game on a 8x8 board (chaturanga?) and were lacking one or 2 players. Could also have been 10x10 (draughts), 19x19 (Go), 9x10 (Chinese chess with 18 pieces each), or any other number of fields.