Code is much simpler, therefore faster, if there is "headroom" above the maximum value within the 16-bit quantity you're working on. Calculations with 16-bit variables can overflow and it can easily be detected. If the max value was 65535, you'd need to do the computation in a longer variable in order to deal with overflow.
The reason for 32768 instead of 32767 as the max value is because many algorithms benefit from having an exact center point between min and max values. Since 16-bit format is an integer format, you can't have the value of 16383.5 which would be the center point if the max value was 32767.
There are also some other computational tricks you can play when using 32768 as a max. These tricks improve performance.
And, oh yeah, After Effects does it that way because Photoshop did it that way first. Why rewrite code that already exists and has been tuned for max performance?
(I swore at it the first time I discovered 32768, but I learned better.)