Microsoft states in a FAQ that keystrokes are collected to improve handwriting and pronunciation recognition and that it can be turned off by going to Start -> Settings > Privacy > General and then disable “Send Microsoft info about how I write to help us improve typing and writing in the future”.