How is publishing under a random pseudonym authorized? Who decides if someone can author/co-author an academic article under a pseudonym, when you want to do so to hide your identity on Google but still want credit for it for your academic advancement?  

Is it the PI, department, university, publisher, or something else, who decides if you could do this? Also is it illegal in any country?  

And from looking at previous threads here, seems that you cannot pick a completely random name as a pseudonym; it usually has to be somehow tied to you in real life - your maiden name, adding your middle name, abbreviating John Smith into JSmith... things like that. Not much change.  

So you can't use names like "spongebob"? How about "JS" or "J" for John Smith?  

Someone mentioned you could get your professor to write that you used a fake name in their letter of recommendation. Would they be willing to write "this person published a paper titled so-and-so under a pen name called "[insert a randomly made-up name here]"."
Editor ultimately decides whether your pseudonym is acceptable or whether any pseudonym is acceptable for the journal. But you have to be practical about the decision to use pseudonym. If some professor, even respectable and famous one, writes you a letter saying


  "this person published a paper titled so-and-so under a pen name
  called ""."


would this really be convincing to everyone? Would this letter be written in ink on paper? What would you do with the paper letter in the XXI century? Scan and send .jpg's? Or attach it to a CV .pdf, which probably has 2-3 page limit? If it was in a digital form it must come from the professor's academic e-mail to have any credibility. Would he be willing to do that every time you need to prove it is you who wrote the paper? 10, 20, 30 years from now?