What is a shear wall and what is it for?
The brace is providing lateral support. If you build a wall with the top and bottom plate plus some studs, it's easy to shift the wall out of square and turn it into a parallelogram. Under load, a house would take an 8' shift to one side and flatten to the ground. With the brace, the wall remains square and holds perpendicular walls plumb.

In typical construction and low risk areas, the exterior wood sheathing and interior drywall provides this lateral support and avoids the need for any lateral bracing. However, in older homes or in higher risk areas, particularly where there are hurricanes or earthquakes, extra support may be added. In my own home, this was done with a metal T that was installed into a grove that was cut in the studs, but older homes will more likely notch the studs and install a piece of lumber.

Before removing this, I'd want to consult with a structural engineer. They may require that you relocate the brace to one or both sides of the doorway, and that will require opening up your walls even more. Removing this structure will likely show little signs of danger until there is extreme weather or a seismic event, so if you were to remove it without proper adjustments to the rest of your structure, don't assume that everything will be ok.

Note that with a truss resting directly on top of this wall, you should assume there is some load passing through, especially if there's any structure above that truss in your house. The fact that it's been cut for ducting may mean that the wall is the only thing keeping that truss from collapsing. When you create a doorway, it's best to install some temporary bracing and make the header a load bearing structure that appropriate for the span.