Technical assessments and take home coding tests are popular among many companies looking for talented software developers. A take home project or assignment can test many things an in-person interview that may last a couple of hours at most simply cannot. They can also be used as an initial screening prior to inviting a candidate to an interview.
One key advantage is that there is usually not a predefined amount of time to complete it which allows the assessors to get a true sense for the quality of code and architecture a perspective employee writes since they aren't racing against the clock. This can give them a good idea of what code the developer may implement in a real-world scenario. Well.. maybe a perfect no deadline world anyways. Another perk for companies is that they don't have to waste their time on candidates that they deem to be a bad fit. The assessment should reflect some basics and fundamentals related to the job you are interviewing for. If a team works with a lot of data visualization the assessment will probably have something to do with displaying data on graphs in different ways. The final advantage for a company is that they can get an accurate reading for the level a developer is at. Based on code design you can usually form an opinion on what you would be willing to pay and where they may land on the spectrum in terms of expertise (Jr, mid, or Sr). Do they create classes and use inheritance appropriately? Do they write unit tests? Are they use extension methods on lists efficiently? Do they know when to break up their code into separate methods to make it easier to read or maintain? These are questions that the assessors may ask and will definitely be able to answer after developers submit the assessment.
There is one HUGE problem that companies tend to overlook when creating these assessments that are required to be done outside an interview setting. When a talented developer, especially a Sr level one with a targeted skillset, is looking for a new opportunity they do not last very long on the open market and they don't want to waste time unnecessarily. They are most likely juggling a few opportunities and wanting to finish the job search within a reasonable amount of time. So unless the company is offering something completely different and unique than most companies out there then they are going to have a hard time forcing talent to take hours out of their evenings to fill out a test or project that isn't guaranteeing them a job or an interview if its part of the initial screening process. A good company culture and interesting tech stack is not going to be enough to persuade them either as there are plenty of companies out there that fit those boxes.