This isn't specific to justifying a visa. This same method is sometimes used when the obvious choice non-cheap-labor hire has already been picked by the hiring manager, but they're required (for any of a variety of reasons outside the manager's control) to post the job.
When it's not used for visa indentured servant games, it's arguably a relatively decent way to to do things (don't put applicants through a charade of being considered, and you're already certain who you want to hire), but better would be to not post the job at all in that situation.
When it's not used for visa indentured servant games, it's arguably a relatively decent way to to do things (don't put applicants through a charade of being considered, and you're already certain who you want to hire), but better would be to not post the job at all in that situation.