Ajax Call 400 Bad Request error with POST request but not with GET request

Well this is very probably going to help someone else sometime so here it goes:

Not setting the request to application/x-www-form-urlencoded makes the POST body behave like a string. So PHP does not recognize $_POST variables. To make that happen we need:

xhttp.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');

So the whole thing goes like:

xhttp.open("POST", ajaxurl, true);
xhttp.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
xhttp.send("action=lalala");

And then it behaves as expected.