That an immigrant might undocumented doesn’t mean he’s ‘illegal.’
Immigration law accommodates migrants seeking asylum to enter the country absent authorization pursuant to an application for refugee status.
Ensuring refugees seeking asylum have access to water is perfectly appropriate and warranted, both on humanitarian grounds and consistent immigration law, where those undocumented have the right to due process and are presumed innocent until found guilty in an immigration court of entering the country illegally.