Semantic 508 comes from the United States Workforce Rehabilitation Act of 1973 that says that all electronic and information technology must be accessible to people with disabilities. Technology is accessible if it can be used without discrimination to those who have disabilities.
Search Engine Optimization is a way to making sure your website is structured in a manner that search engines understand. This way, it can increase traffic to your websites because people will be able to navigate to it.
SEO and Section 508 work together because the HTML helps those with disabilities easily navigate through the web by providing them with easy to read HTML. This helps them understand the websites and get to where they need to be.