https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_functions_advanced_methods?view=powershell-7.3
Pretty straight forward. Microsoft states:
Using either a begin or end block requires that you define all three blocks. When using any block, all PowerShell code must be inside one of the blocks.
The examples in the style guide do not fit Microsoft's recommendation.