name attribute is used in the HTTP request sent by your browser to the server. The
They do not have to be the same but they can be as in the case in the tutorial.
Id's must be unique to the tag that it is inside and only used once on any given html page.
name doesn’t have to be unique, for example there are cases where you would use it many times with radio buttons.
Here’s a link to an example where the name attribute is used many times:
Also, a page with a list of attributes: