That is not a bug
By
default, Calibre looks for certain words in the 'Structure Detection' section of Conversion, to split/make into headings, upon.
Were you expecting Calibre to count the results and go 'That is an absurd number of Chapters' ?
IMHO p class="
chapter" was a weak choice for a pragraph selector name
One I have not seen used by common ebook publishers