For example: you can use clipper circuit to generate square wave. or limit the output voltage (for protection), ...etc.