This operation does not convert each space into a tab. It converts spaces to tabs based on your indent settings (Tools > Options > Language > ... > Indent). The default definition for Tabs is +8. So, this operation will convert 8 spaces into a tab character. If there are fewer than 8 spaces in a row, nothing will be done. If there are 12 spaces in a row, it will convert them to 1 tab followed by 4 spaces.
If you want each space to be converted to a tab, change the value of Tabs from +8 to +1. Better yet, use a regular expression for Replace so you don't mess up your coding settings.