This is the browser's default file naming coming into play. The browser doesn't know anything about the meaning of the format parameter. It just sees the resource being accessed is called 'users', so it defaults to that file name.
In the former example, the resource being requested is called users.csv, so it uses that as the default file name.
You may also want to look into the Content-Disposition HTTP header. This will cause the browser to prompt the user to save the file with a specified file name as the default (the user is free to change that though), instead of displaying the file in the browser. Thus, you could have your resource be http://localhost:3000/users?format=csv, but default the file name to foo.csv with this header:
Content-disposition: attachment; filename=foo.csv
Check out this Microsoft link for some more information. The concept is the same for rails as it is for any HTTP technology.