WordPress and Joomla are created specially for content management. That's why both don't contain e-commerce sections (by only installing the CMS).
As time went on, Plugins/Components developers created e-commerce applications for Wordpress/Joomla. But Wordpress/Joomla are not designed by default for e-commerce... Both are the best for managing content. So if you want to use Wordpress/Joomla for e-commerce purposes you will have several utilities never used (such as Articles, Links, Comments, Image Galleries, Users - just some examples).
If you want to make an e-commerce site, I recommend you to use some clear applications dedicated to e-commerce solutions like OpenCart, TomatoCart etc...
It is important to ensure that your online store website is getting the best so that you can get the best out of it. Therefore, Joomla would be a better option for running an online store as it has many templates and themes.
Both are good for coding, and technical aspects. They are most popular content management systems. WordPress is the best pick for the beginners, and works good for small and medium sized website. But Joomla is good if you want e-commerce type site.
Wordpress is the definitely the Go-to here. Wordpress framework is much better then Joomla and their designs are much cleaner and more SEO friendly.
Problem with wordpress occurs when the developers of plugins, discontinue the support for a plugin and wordpress puts out an update. Its always sketchy updating wordpress at that point and is recommended to not do so.
The best CMS I have came across (although I use WordPress) is Squarespace. It's all in house development and everything functions perfectly. Any WordPress user know that WP just has bugs that you have to work around sometimes. Squarespace doesn't have that problem. But the downside to SS is you are limited in choice of designs.
You can use WordPress also for eCommerce or Joomla also but I will suggest you to use Magento for online shop. But if you are specific about using any of these then you can go with WordPress but there is some hacking issue and you need to keep your server secure enough to stop hackings.
Joe S if i start writing why wordpress is best i cant stop myself but let me give you some hints wordpress is truly free and open source support is great hell of plugins give you more functionality. its visual editor and cms is outstanding. themes let you style your site and google love wordpress bcoz of its seo thing.