The selectedindex property on Accordion presumably just gets translated into a javascript call - so panes hidden on the server don't count, but other serverside methods (such as AccordionPaneCollection's IndexOf method) just go through the collection of AccordionPanes and count all panes, not just visible ones.
As a result:
myAccordion.SelectedIndex = myAccordion.Panes.IndexOf(myAccordionPane)
will result in a different accordion pane being selected when the page is rendered, if any prior panes are hidden.
As a result:
myAccordion.SelectedIndex = myAccordion.Panes.IndexOf(myAccordionPane)
will result in a different accordion pane being selected when the page is rendered, if any prior panes are hidden.