Temporary tables are useful when you need to do something on the fly. Instead of writing full CREATE TABLE statement and then inserting from another table, you can do the following with one query:
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name
Source: http://linuxapachemysqlphp5.blogspot.com/2013/05/create-temporary-table-in-mysql.html