How Yoast SEO plugin works with variable %%name%%?

It does not create tables, it stores data the “WordPress way” in the postmeta table, which is common to all WordPress functions. Because it’s common to all WordPress functions, the ID’s are going to be out of sequence for Yoast data, because it’s going to be “commingled” with much other data that gets stored in that table.

As to your question about the %%name%% variable, it appears you are trying to use the variable inside your post title, which you cannot do. For it to work, you’d need to do something like so, in your Titles & Meta Settings:

%%title%% - by %%name%%

IMPORTANT UPDATE
This actually is a bug in the preview feature on the post (as of version 2.3.5, and up to and including version 3.0.7). The variable %%name%% is NOT getting parsed properly.

However, if you view the page itself, the variables are being parsed properly, including the %%name%% variable.