A temporary table is a real table and can do everything a normal table can, SQL Server will do all possible optimizations on it, especially if it has secondary indexes, can be in transactions, respects your database settings anyway, the only difference from the normal table is that it will be discarded at the end of the user session or of all users who use it.
Variables with tables can be easier to use in some scenarios like stored procedures and functions. It can even help their performance itself (not the execution of the query). But you hardly use these things, right? Or you are DBA? : P But there are things that are harder to do with this feature. The variable is a programming resource in the database, not usually used in the normal manipulation of the database, it is a code instrument. Don’t use it for tables with more than hundreds of lines. Think of it more as a array a little more sophisticated than a table itself.
As each has a function they offer more advantages in the appropriate scenario. Interestingly a feature made for programmers is usually used by Dbas who like to play code within the database, and the feature most made for the database itself is preferred by programmers since they program outside the database.