A list compiled by CNBC showed that the best states to do business in 2022 performed well under tense economic conditions and positively marketed themselves. CNBC also cited states' policies, achievements, and goals to help local, national, and international businesses and workers thrive.

The top 10 were North Carolina, Washington, Virginia, Colorado, Texas, Tennessee, Nebraska, Utah, Minnesota, and Georgia. CNBC highlighted North Carolina's ability to put aside partisan differences to reach common goals.

"Businesses look for that and they also look at what happens after the deal is done. Does state government, local government continue to work with them and try to help them succeed? Some of our best recruiters are CEOs who are already here," Democrat Gov. Roy Cooper told CNBC's "Squawk Box."

However, CNBC did not just measure how well a state attracted businesses, but also the quality of life for those who live and work in a state. While some states may attract potential businesses to relocate or add locations in the area, the residents may not have as many worker protections, rights, or a prosperous economy as other states.

For example, North Carolina finished in the top spot, but does not have a law protecting workers from discrimination unless they are disabled.

Washington, consistently in the top 10, came in second for its concentration of STEM workers.

Virginia and Colorado, which finished third and fourth, respectively, are states with solid workforces for different reasons.

Virginia, which came in first in 2021, has a robust workforce and strong education system, but does not have many college-educated workers as in Colorado. However, the sheer number of college-educated workers in Colorado drives up the cost of doing business in the state.

Notably, Texas is becoming a hub for business, rounding out the top five list. Many tech companies, including Tesla, flock to the state from California in search of better business opportunities.

However, considering the rights of workers and residents, Texas ranks lower than most of the Top 5 candidates. Texas finishes 49 in CNBC's life, health, and inclusion category.

The bottom 10 states included Arkansas, New Jersey, Maine, West Virginia, Rhode Island, Hawaii, New Mexico, Louisiana, Alaska, and Mississippi.

Mississippi finished last in the life, health, and inclusion, and business friendliness categories. It also finished 49th in the economy category and 48th in the technology and innovation category.

A pedestrian passes a "Help Wanted" sign in the door of a hardware store in Cambridge, Massachusetts, U.S., July 8, 2022.
A pedestrian passes a "Help Wanted" sign in the door of a hardware store in Cambridge, Massachusetts, U.S., July 8, 2022. Reuters / BRIAN SNYDER