Data modelling concepts
Sometimes this is called "a cycle" in database design, and while it is not forbidden (because as the commenters point out, you must take into account your purpose and business problem), it is considered a red flag for many designers.

Here is a related Stack Overflow question that attempts to point out why this can be a red flag: https://stackoverflow.com/questions/8115748/why-should-i-avoid-loops-when-designing-relationships-for-a-database