I would like to know if it is an unwritten rule to include the names of the departments of the authors' of a journal submission?
Strictly speaking, it is usually a written rule, as journals have written rules governing what they expect from submitting authors, and this usually includes information about their affiliation. It is an unwritten rule in the sense that tere is no rule that all journals should follow the same format, but it is very common to include the authors' affiliation.
Sometimes this information is helpful as different departments belong to different "schools". So knowing the department alone can sometimes help you "place" the article in wider debates. Sometimes, it helps disentangle people with the same last name and the same initials. Regardless, this information only helps when you are an insider to the (sub-(sub-(sub-)))discipline discussed in the journal. However, those insiders are a legitimate audience for a journal, so I don't see a problem here.
You always need to include your primary institutional affiliation, even if that all the affiliation you've got is "Me, Myself & I Consulting, LLC" (and I've seen papers with that sort of affiliation).
Department information, however, is much more optional. After all, many people who are not in traditional university faculty positions may not have a clear or meaningful department. Consider, for example, a strong institution like the Santa Fe Institute, which has professors but doesn't appear to have bothered to subdivide itself into departments. For another example, my department currently has the name "Information and Knowledge Technologies", which I'm fine putting down as a departmental affiliation; before the last re-organization though, it was "Business Unit B", and before that, it was "Department 49", neither of which would have made any sense to write down as a department.
Bottom line: include departmental information if you think it is helpful, or if it is explicitly required. Otherwise, it is up to you.