Write a Python program that reads a file and sorts the lines of the file by the length of each line. Your program should retrieve the file's name from the user and take into account the file's contents, including any punctuation and white spaces, when sorting the lines by length. Once the sorting has been implemented, the program should output the sorted lines to a new file named "sorted_file.txt". Use proper coding conventions and provide clear comments throughout your code.
This prompt doesn't seem malicious.