The theme might include CSS code that gets applied to the accordion's elements. For example, if you add a paragraph layer, the style added to paragraphs by the theme, will also get applied to the paragraph layers inside the accordion. The same can happen for heading or image layers.
The accordion includes some CSS code that minimizes the influence of external CSS, but it's not always possible to eliminate this influence completely. So, when you see unexpected styles in a published accordion, you will need to add some custom CSS to override the style added by the theme's CSS.
Regarding layers, another solution for preventing CSS influences from the theme would be to use DIV layers instead of Paragraph or Heading layers, since DIV elements are usually not styled by themes. However, my recommendation is to use Paragraph or Heading layers every time it's appropriate and simply use custom CSS to prevent theme influences.