The bug
Jigsaw generation terrain_mach parameter causes blocks to replace invalid blocks (transparent blocks and other jigsaws). This causes customly (both by custom worldgen for some reason and by manually activated jigsaw) generated paths to be really messy, as seen below.
How to reproduce
Place jigsaw block on naturally generated biome that contains grass (grass. Not only grass blocks)
Use this command
/setblock ~ ~ ~ minecraft:jigsaw[orientation=west_up]{final_state:"minecraft:structure_void",joint:"aligned",name:"minecraft:street",pool:"minecraft:village/plains/streets",target:"minecraft:street"}/setblock ~ ~ ~ minecraft:jigsaw[orientation=west_up]{final_state:"minecraft:structure_void",joint:"aligned",name:"minecraft:street",pool:"minecraft:village/plains/streets",target:"minecraft:street"}Generate the element with level 2 or higher
Observe every block getting transformed
Next use the same command on a biome or in a place where there is no blocks such as grass or flowers
Generate the element with level 2 or higher
Observe the path generating normally
I can confirm this behavior in both 1.18.2 and 22w19a. This ticket relates to MC-187131.