Xiaomi temporarily locks the bootloader to prevent third-party Chinese retailers from bundling malware and adware with its phones sold on the international market[1].
Which is hilariously dumb because now 3rd party retailers are the go to source if you want to buy a Xiaomi with unlocked bootloader rather than waiting a month . It's creating more business for the people they are supposedly trying to stop.
Also none of the stock Android phones they sell have a wait time for bootloader unlocking, it's only the ones with their own os MIUI
Xiaomi doesn't give a shit about the bootloader itself. What it cares about, is people receiving a modified version of MIUI which it has no control over:
"The retailers would buy Xiaomi devices in bulk, unlock the bootloader, change the software themselves or flash a custom ROM like Xiaomi.eu (unofficial ROMs based on MIUI China but with more languages and features), and then sell the device. Most consumers would have no way of knowing they’re running unofficial/modified software, and would instead blame Xiaomi for a lack of updates or bugs they encounter."
>Most consumers would have no way of knowing they’re running unofficial/modified software
It's right there on the boot screen. They can make it more explicit if they want with a red skull or whatever. That reason doesn't fly. Also, what changes in 30 days ?
Xiaomi is primarily a software company, not hardware. It sells hardware almost at its costs, because it treats it as a user acquisition. If a re-seller replaces the official MIUI version with a modified one, Xiaomi loses a customer. Xiaomi doesn't care about Android One phones, and allows them to be unlocked instantly.
I think you are conflating a few different things. That they want you to use their OS is obvious. The 30 day period may even be a wear-you-down period, so that you grow to like their OS. That is quite unrelated to the evil reseller backstory, mainly because the reseller could do that after 30 days too, and if they only wanted to thwart resellers, they could do captcha + ip checks, which they presumably anyway do.
The percentage of people who unlock the bootloader themselves is so small, that Xiaomi couldn't be less worried about them. On the contrary, unlike many other manufacturers, Xiaomi releases the source code and welcomes enthusiasts. The problem is with re-sellers, who unlock the devices in bulk and sell a modified version of MIUI to non-technical people. The longer the unlock period is, the longer the re-sellers have to keep the inventory purchased before they are able to make any modifications. This increases their costs and risks, because they now have to make large investments up-front.
Waiting is inconvenient to buyers and to explain it away, Xiaomi provide some silly reasons such as saying they are trying to thwart sideloading of apps and custom ROMs by resellers, that does nefarious things like steal data... it's a silly excuse, and the wait time inconveniences buyers who want to unlock and install custom ROMs.
Edit: I suspect Xiaomi do this to keep you using MIUI as long as possible because they make money from showing ads in various parts of the system, and also sync your data back to their cloud which probably is resold in some derived form to advertisers. In my opinion, MIUI sucks. MIUI vs. LineageOS proved it is the phone OS (software) which influences how much a person likes a phone, rather than the hardware.
They've recently increased the wait time from 2 weeks to 2 months which had buyers complaining loudly on forums. So for their newest device (the Pocophone) they reduced the wait time to about 3 days. But I think the long wait times still exist for other phone models.
The wait time depends on Xiaomi's mood-of-the-day. They keep fluctuating it.