Names can be blocked for 24 hours using an invalid giftcode.
As said in the title, usernames can be blocked for a brief period. All you need to do is go to minecraft.net, create a Mojang account without Minecraft purchased, go to the Java giftcode redeem screen, find an available name, and try to redeem that name with an invalid giftcode. After that, the name should be unavailable for 24 hours (on all other mojang accounts aside from the one you used to block the account). I'm sure this was unintended, so that's why I'm reporting it here.