I'm aware that there are some major differences between Scandinavian law systems and other European systems, e.g., the fact that Roman Law had very little influence in Scandinavian countries. But why has the idea of a general civil code like the BGB or the Code Civil been rejected? Why resort to case law or legal doctrine instead, considering that, in many EU countries, they aren't even considered sources of law?
Sweden and most of the other Scandinavian countries once had a civil code based upon the Civil Code of 1734.
Generally speaking, this code is in turn derived from the German Civil Code (as opposed to the French Civil Code), which is written in a more carefully defined, lawyer oriented manner than the French Civil Code which sought to be written in common French for use by the ordinary French citizen.
In general, Scandinavian law is originally quite similar to the German law upon which it was modeled, and the systems have continued to influence each other intellectually. For example, Scandinavians followed the lead of the Germans (or vice versa) in adopting "day-fines" as a major means of criminal punishment in the time period following World War II.
Both the French and German civil codes, in turn, were derived from Roman law.
But, at some point prior to the end of World War II, the Scandinavians departed from the German model substantially.
All civil law jurisdictions resort to doctrine from legal treatises as a major source of authority and the Scandinavians are no exception. Leading law professors in civil law countries have an influence on how the law is interpreted comparable to that of leading appellate court justices in common law countries.
But, unlike other civil law countries, Scandinavians rely upon case law more than Continental Europeans do as binding authority in the form of judge made law.
It appears that the typical Continental European pattern that was in place at one point in Sweden's modern history has been supplanted by a system that does indeed give more weight to case law and is more systematic. This European Commission source confirms this account in the private international law context, stating:
Private international law in Sweden is codified only in part, and consists of a combination of statute and case law. The statute law is for the most part aimed at giving effect to international conventions to which Sweden is a party.
This book, however, notes that Sweden is in the process of drafting a more comprehensive and systematic civil code for itself and made significant progress towards that goal with a 2009 report, in furtherance of the goal of better harmonizing the private law of EU and EFTA members.
The very thin Wikipedia article in English on the Law of Sweden, upon which I relied, appears to be inaccurate, or at least, misleading, on the key points. Based upon your comments and the information gathered while updating this answer, I have updated the Law of Sweden article to make it more accurate. It isn't clear from sources available to me, however, precisely when Sweden began to deviate from the German model other than to say that it was sometime well after 1734 CE and was not later than the end of World War II, which as a two century range admittedly isn't very specific.
Skimming the material, a lot of the reforms apparently take place in the late 20th century. The scholar in the linked power point presentation suggests that Sweden's legal system is neither in the Civil Law tradition nor the Common Law tradition, contrary to my understanding until your comments brought more information to my attention. Not having my histories of Sweden or Finland easily at hand, it is hard to tell how or why this happened. But, I appreciate your comments and question which have brought this information to my attention and would strongly suggest that you prepare an answer of your own as you appear to be very knowledgable about the details of Swedish law and may be better equipped than I to get to the bottom of the question.
This journal article discussing the Swedish tort statute adopted in 1972 suggests that following World War II there was a concerted international effort of the Scandinavian countries to engage in legal cooperation producing more or less uniform laws in the region related to private law with tort law high on the agenda for reform and homogenization although turning that into concrete legislation apparently took 27 years and many commissions and negotiations.