The bug
After creating a new hardcore world, the buttons Allow Cheats and Bonus Chest are supposed to be locked/disabled (greyed out).
However, if you choose Superflat or Buffet as the world type and press Customize, the next time you join this screen, all the buttons will be unlocked/enabled, but you can't change the value of the buttons mentioned above.
How to reproduce
Make a new world
Set game type to Hardcore
Go to More World Options
Select Superflat or Buffet, and hit Customize and head back
→ ❌ The options for Allow Cheats and Bonus Chest aren't greyed out
Related issues
is duplicated by
Comments
Reoccurring in 15w51b. It happens also for World Type: Customised -> Customise
Can confirm for 1.10.2.
Still affects 16w32a and 16w32b.
Still in 16w33a.

Confirmed for 1.12.

Still affects 17w47b

Still in 17w48a.
Affects 1.13-pre1

@unknown, ticket is yours now.

Affects 19w02a.
To put it more simply, selecting 'Hardcore', clicking 'Customize' on Superflat or Buffet world generation, then going back unlocks the 'Allow Cheats' and 'Bonus Chest' buttons, even though you can't change their settings.

Affects 19w08a.

This has been fixed in 19w35a.
Still happens in 13w38c.