This is something the designer of the system can choose.
The CPU doesn't know about your different types of memory chips. The CPU puts an address like 0x1234 (0001 0010 0011 0100) onto the address bus, and reads the data from the data bus. It doesn't know which chip is outputting the data to the data bus.
This designer has chosen that addresses 0x0000 - 0x7FFF will access the ROM chip, and addresses 0x8000 - 0xFFFF will access the RAM chip.
Therefore, the ROM chip should be selected when the address is 0x0000-0x7FFF, and the RAM chip should be selected when the address is 0x8000-0xFFFF.
How do we do that? It is easy: connect A15 like it is shown. When the address is 0x0000-0x7FFF, A15 is 0. This means the ROM chip's /CS is 0, so it is selected. And the RAM chip's /CS is 1, so it is not selected. When the address is 0x8000-0xFFFF, A15 is 1. This means the ROM chip's /CS is 1, so it is not selected, and the RAM chip's /CS is 0, so it is selected.
What would happen if there wasn't a NOT gate? Then addresses 0x0000-0x7FFF would activate both chips, and addresses 0x8000-0xFFFF wouldn't activate either chip.
You notice that it's very convenient to divide the addresses this way. If we decided that that addresses 0x0000-0x1234 were ROM, addresses 0x1235-0x2111 were RAM, addresses 0x2112-0x3301 were ROM, etc... it would be very difficult to make a circuit to decide which chip to select! That is why we almost always use 0x0000-0x7FFF and 0x8000-0xFFFF when there are two chips.