This is intentional, and follows the same behaviour as GitHub:
Admins can enable the “traditional markdown linebreaks” setting in the site settings to change the behaviour.
You may be interested in this topic which describes some of the rationale behind the implementation.

