Moistly a design choice.
Both mechanical and compression lugs are available for a large majority of wire/cable.
Some specs call for compression, especially on Aluminum, but that a design choice not a Code issue.
Fine stranded wires, such as DLO cable, often employ compression connectors.