Wordpress is just one of many CMS available for free. There are many paid one too.
It doesnt matter how you build your website. You can make it a simple static html with no php or anything else there and rank it #1 if you do your job.
Using a CMS has no benefits on its own, while we are talking about ranking. More over - its worse compared to plain html sites, because its a little bit slower - it takes time and power to compose a dynamic site.
Most webmasters use CSM because others do it, and its easy, really easy to built a site with no knowledge. Then they load it with SEO plugins and wonder why the site is not on page one.
One of the main benefits of using CMS is scheduled posts - you can write or order 100s articles and schedule them over the next year, so you get a fresh site with new content published daily on autopilot. In this way you can work on many websites simultaneously.
According to your question - wordpress does not have much related to SEO at all. Your website's seo depends on the theme you use and plugins.
If you use a good theme and plugins, or make all changes yourself with no plugins, then you can end up with the best option ever.