HTTP-01 challenges would absolutely break if the www subdomain and apex domain were not pointed to the same server, which is extremely common. For example if you're on Cloudflare, it's more efficient to have CF handle redirection at the edge, i.e. forwarding www to apex or vice versa, rather than sending traffic onward to a server to do the same thing.
If I requested a certificate for the apex domain only, and it tried to add www automatically causing the entire process to fail because www is processed elsewhere, I would be moderately disgruntled.