Road signs allow knowing who’s responsible for maintaining each road/street (federal government, state government, or municipal government), but not the type of road. This has caused a lot of confusion and disagreement in the Brazilian mapping community, which for a long time has been divided between classifying roads according to the planned classification (reflecting some sense of importance) or strictly according to observable physical characteristics. The first one leads to a more readable map and appears to be what other maps (Google Maps, Here.com, Waze) are doing, while the second one leads to fragmented road networks with alternating class (thus not reflecting hierarchy) due to many yet unrealized infrastructure improvements. Motorists, cyclists and pedestrians expect road signs to tell them what they are not allowed to do (speed limit, access and turn restrictions, etc.), and this signage is often precarious. The law you mentioned only applies when signage is completely absent, and at least for speed limits, it is generally not absent in the main ways. It is also often present in more local ways in the more developed regions of the country, but even in those regions it is often absent in the poorest areas.
Regarding urban ways, there is some reasonable consensus that mappers should try to adhere to the published road hierarchy for the respective municipality. The degrees to which this was applied to the map vary greatly from region to region, depending on the number of local contributors.
Regarding rural ways, there has been much discussion, the most recent being this one. At least in Rio Grande do Sul, trunk roads were chosen collectively by vote to try to emulate the British model, on which communities from other countries (including Germany and other European countries) based their current rules. Something similar seems to be happening in Argentina. There have been none less than seven proposals for highway classification in Brazil, an although this one from 2013 is the only approved one (contrary to what would be suggested by this article), its problematic results have received heavy criticism since 2014.
Also, the official types of highways in Brazil are largely based on the American functional highway classification, same as proposed here. However, ways that do not correspond exactly to any physical profile of the official highway types (as defined by regional highway planning departments) can often be found.