Was wondering if doujinshi can get an anime adaptations and become real manga that are officially sold by companies.
If by "doujinshi" you mean "self-published manga that parody other published works" (probably the most restrictive definition), the answer is yes. Examples:
- Nyoron Churuya-san (a Suzumiya Haruhi no Yuuutsu doujin)
If you loosen the definition to "self-published manga", there are even more examples:
- Sore ga Seiyuu!
- Getsuyoubi no Tawawa
If you go further and consider all self-published works (including webcomics and text-only media), there are even more:
- Maoyuu Maou Yuusha (originally a series of posts on 2ch)
- Isekai wa Smartphone to Tomo ni (originally posted on "Shousetsuka ni Narou")
- Re:Zero (likewise)
- One Punch Man (originally a webcomic)
This is by no means a rare phenomenon. Self-published stuff that becomes popular gets commercialized pretty often.
Example: Yoshitoshi Abe's, Haibane Renmei.
Afro Samurai was a Doujin before being produced into an animated series, being self published through the magazine Nou Nou Hau
Any production company can pick up any work, regardless of who published it, as long as the right people give consent and are paid.