That's because in Linux, the default user shell is often bash, and the /bin/sh was often symlinked to /bin/bash (on Redhat base distro) or /bin/dash (on Debian and Ubuntu base distro).
Declaring array set -A is ksh syntax, first implemented in ksh88, and also supported in ksh93, pdksh and its derivatives, and zsh.
You can switch to other array syntax, which supported both by ksh and bash:
set -f # turn off globbing
days=( $(cal "$month" "$year") )
or using Stéphane Chazelas's one hereStéphane Chazelas's one here.