You have three commands here:
checkout scm # This is the basic jenkins clone which you often don't even need to explicitly call
dir() # Make a work dir and run some commands insideit
checkout( .. # Checkout using the git plugin https://plugins.jenkins.io/git/ with a lot more control over the checkout behavior
In this case, the you are making two checkouts, one inside a subdir and with more detailed options (potentially overriding the branch or upstream URL).