What are deranged noises?
Deranged noises refer to noise values out of defined ranges. For example, the PV(peaks and valleys) level is defined only when the weirdness noise is between -1.0 and 1.0. If the weirdness noise is out of ±1.0 at a location, then I say there's a deranged weirdness noise at the location.
https://minecraft.wiki/w/World_generation#Biomes documents noises for biome generation and their ranges detailedly.
In both JE and BE, deranged weirdness causes deranged terrain height, which often results in interesting terrain and do not affect gaming.
What Happened?
In Bedrock Edition, deranged noises affect not only terrain height, but also structure generation. Structures may generated in wrong biome if a location has deranged noises.
How to reproduce?
-2659250400746428090, at -810 77 230
There's a big basin filled with water, which is caused by deranged weirdness value. In this basin, there're only two biomes: plains and meadow, but there're five structures gathering together: Pillager Outpost, Woodland Mansion, Village, Woodland Mansion, Stronghold. They all generate in wrong biome.
-7360672562458547898, at -800 100 100
There's a big basin filled with water, which is caused by deranged weirdness value. In this basin, there're six structures gathering together: Pillager Outpost, Woodland Mansion, Village, Buried Treasure, Woodland Mansion, Stronghold. They all generate in wrong biome.
Analysis
Game developers maybe do not know the range of the noises and assumed that they are all within ±1. As a result, when the game checks the biome to generate a structure, it often makes mistakes.
Related to MCPE-167106, MCPE-153203(only for Woodland Mansion)
Linked issues
is duplicated by 2
relates to 3
Attachments
Comments 6


Analysis:
This issue not only due to deranged noise, but also relates to the extremely low surface height.
The PV value is defined only when the weirdness noise is between 1.0 and 1.0, but when the weirdness noise is out of ±1.0, the PV value is still calculated for terrain generation. When the weirdness noise's absolute value is 2.0, the PV value will be -3.0 theoretically, which makes extremely low surface height.
The preliminary surface height maybe lower than -64 (The real surface height won't be that low, at least the bedrock layer will generate), which is treated as 32767 when the structures check the biome. This will cause overflow when checking the biome, which cause the biome check skipped. Then all structures can generate in any biome.
Video link:
https://m.youtube.com/watch?v=P8TwdCFGU1g&t=0s
https://m.youtube.com/watch?v=1cHCq2FcleI&t=1s&pp=ygUOc2lua2hvbGUgc2VlZHM%3D

@unknown: Stop repeatedly adding and removing a space from your comment. You are just spamming emails to everyone watching this report.

Can confirm in 1.21.44 hotfix and 1.21.50.29.
I've attached some photos about the bug (2 photos per affected seed).
Seed 1:
Seed: 1675993202862557064
Coordinates: 300, 150, -850
Seed 2:
Seed: 5200809710701768068
Coordinates: 240, 100, -808
Seed 3:
Seed: -2567058721875847080
Coordinates: -850, 65, 100
Seed 4:
Seed: -5302153468370680597
Coordinates: 100, 85, 700
Seed 5:
Seed: 5051415093105167690
Coordinates: 700, 100, 250
Seed 6:
Seed: -126217388446645013
Coordinates: 100, 85, 700

I'm the seed finder who initially discovered the biome checks were being skipped, reverse engineered the cause and used that knowledge to find the -7360672562458547898 seed.
There's a few things going on here...
The function that finds the prelim surface height has a default return value of 32767, the max 16 bit signed integer value (on java its Integer.MAX_VALUE). The biome checks on bedrock return false if a biome is found that isn't in the list of allowed biomes. Because the biome checks are 3 dimensional, the top y coord for the biome check overflows to a negative value causing the entire loop for the biome check to be skipped. I'm actually quite surprised the biome checks are 3d for surface structures as I would have thought just passing a depth of 0 to the biome source and doing the check in 2 dimensions would have been better, and would mean dripstone and lush caves biomes wouldn't need to be on the allowed biomes list for woodland mansions.
The default value gets returned from the prelim surface height function is because it gives up when it hits the bottom of the world and returns the default value. The reason the surface dips that low in the first place is due to the terrain shaper. For continentalness values of 0.25 and 1, for erosion values of -0.35 and 0.58 the depth from the terrain shaper has no floor and is only limited by how high or low the weirdness value can go. For continentalness -0.1 the only erosion values that have a floor are -0.4 and 0.7 all the others are only limited by weirdness. I'm not sure if this was intentional or not, I can certainly see the continentalness -0.1 values being intentional as potentially a way to smooth out the transition into ocean.
Another side effect of the prelim surface height is aquifers that generate in the sky. The reason this occurs is the 16 signed int gets cast to a 32 bit signed int before it gets used in aquifer generation. This means it doesn't overflow and provided there is a large enough area where the surface drops below y -64 aquifers will generate in the sky. Interestingly the only reason this didn't occur in java (before the aquifer chunk order was changed mitigating the effects of this bug on java) is because java uses Integer.MAX_VALUE which does overflow in the aquifer code. Changing the default return value of the prelim surface height method on java (pre 1.19.2?) to match bedrock causes java to generate the same aquifers in the sky that bedrock does.
Happy to clarify any of this if required.

Can confirm for 1.21.50 and 1.21.60.23 with the seeds below
Affects 1.20.62 and 1.20.80.21 Preview