In the first example "the" is used because of generalizing. When you generalize about something (an object, an animal), you use the definite article before it if it is a singular countable noun. Some other examples would be:
The horse is a mammal.
The telephone is a useful invention.
Notice than uncountable nouns are used without an article in this case:
Milk is good for you.
In the second example "last time" sounds similar to "last week" or "last month" and that is why many people would not use "the". Compare, however, these two sentences:
He said something completely different last time.
The last time we met he said something completely different.
In the first example"last" means "previous, the one closest to the present", and is similar to the use in "last month, last week". In the second example we use "the" because it is the last in a specified period of time or within a specified group of events. The difference would be more obvious here:
We met last Friday.
This is the most recent Friday.
The last Friday he was here we went to the museum.
This is not the most recent Friday, but the Friday, which was last of all the Fridays he was here.