If the '*.txt' glob was expanded then the find command would be passed a list of files in the current directory which is clearly not the intent. By wrapping the glob with quotes you are telling bash not to expand the glob but to pass '*.txt' directly to the find command so it can process the glob against each directory it visits.