A lot of “rules” taught in high school writing classes are more stylistic choices. They’re not necessarily wrong. Some of them might help to improve clarity, or a rule might help encourage new word choices so writing doesn’t sound so repetitive. Lots of reasons. But many are more for style. Hey I did it! I even made a sentence with only an implied subject and verb, naughty.
I would also argue that sometimes a period followed by a conjunction can be the best stylistic choice. Maybe the sentence was already getting too long and a break was needed, but you still wanted to draw contrast. Maybe you could have put a comma but wanted an increased emphasis on what comes after but. A lot of these things are just preference or style though. Like “never ending a sentence with a preposition.” Of course you can end a sentence with a preposition, but you might want to make sure what the preposition is referring to is clear to the reader too.