Are you actually using exec before each xinput command? If so, only your first xinput command actually gets run. exec replaces the currently running process, effectively making it run-this-and-exit.
Looks like & saves the day by invoking the command in a subshell and then in that subshell exec replaces the subshell with the xinput command. E.g. you can test it by