The idea is that the code within the braces here is only executed when x is non-nil. The purpose of the if-let in this case is to explicitly remove the need for manually unwrapping the variable where it is being used, while still retaining its name for simplicity and ease of recognition. It’s perfectly acceptable to use another name, as well, but you can think of this construct as being similar to ‘if x is not nil, then [do stuff with x]’. In that case, keeping the same name makes that intention clear.
Note also that the guard keyword allows you to mark a function as accepting nil, but that it only performs operations if that variable is non-nil. Using ‘guard let x = x else { return }’ allows the method to be written as if x was non-optional while also allowing for a nil input that would simply be a no-op.