Bag of words just means ignoring order---word counts are taken into account and they are important. Maybe the tutorial was just showing a basic example. Generally in LDA documents are represented as word count vectors.
As @conjugateprior says in the comments, the dirichlet distribution depends on these counts. My understanding is that in the generative process for LDA, a distribution over topics is drawn and then, for each topic, words are drawn from a distribution over words. So one word might be drawn multiple times. LDA essentially allows you to infer these distributions for a corpus using the text data. If a word thus appears multiple times in a document, it would lead to a corresponding higher weight in the inferred distribution. Without counts, I think you would just be assuming that each topic has a uniform distribution over words— in LDA though a dirichlet distribution is used. Probably the uniform would work, but as you said there is important information in the count of words.