For example, trying to start a 40x40 map with 6 players resulted in a map that is actually 36x39 in size. Is this intentional?
Yes. Sometimes it isn't possible to make a map symmetrical at 40x40.
From the docs.
Maps are randomly generated at the start of each game. The generator does the following:
- Tries to match the given width and height as closely as it can while still creating a symmetric map. Maps are guaranteed to be the given size or smaller in each dimension; never larger.
- Tries to create interesting maps in which there are patches of high production squares and patches of low production squares, with fairly low noise on the small scale.
- Always creates symmetric maps. Specifically, the generator generates a chunk of the map and then tesselates, reflects, and shifts it to produce the entire map.