It sounds like you need a screw primer.
Strength is of very little importance here. There will be no serious loads on these screws. So anything that goes through the 2x4 into the existing framing. Since 2x4 stock is only 1.5 inches thick, you need a screw at least 1/2 inch longer than that. A really long screw is a detriment here, since it takes longer to drive, more friction, etc. So is a thick screw. I'd buy 2 or 2.5 inch screws for this. Since you will be drilling at an angle through the wood, 2.5 is probably better. Again, you don't need the holding power of a 3 inch long screw here.
Wire size is important. This defines the thickness of the screw. You will see numbers like #6, #8, and #10. Bigger numbers mean a thicker, stronger screw, that will displace more wood fibers. So thick screws take more effort to drive, but they are stronger. Requiring more effort to drive means it wears out your arm and the battery in your driver more quickly. Typically, you will be able to buy screws in a length of at least 2 inches as #8 screws. Even a #6 screw would be entirely adequate here.
Next, I'd go with square drive (Robertson drive.) A square drive screw is nice, in that you can stick it on the end of the bit, and it will stay there without you needing to hold onto the screw. It is better when you are working in tight places. Square drive screws are far less likely to strip out the head (cam out) than are Phillips drive screws. Believe me, once you use square drive, you won't go back.
There is no need to pre-drill holes for these screws. Pine 2x4 stock is soft as screws go. If I was putting a 2 1/2 inch screw through that much dry white oak or rock maple, a pilot hole would be necessary, even mandatory. Not here.
How will you drive these screws? A manual screw driver will work to drive a couple of screws. But I'll quickly grab a battery powered drill or even a powered screw driver for a job like this. 12 volts is nice, but 14.4 or 18 volts is better, but heavier. Remember, smaller batteries mean occasional recharges and battery swaps, but a lighter tool.
Finally, there are many stainless screws you will find on the market. Stainless steel is great for some applications, for example exterior decking, driven into pressure treated wood. But stainless is relatively soft. I can tear off the head of a stainless deck screw if I over-torque it. Just get a basic steel screw, made for general construction application.
Although the modern trend is fast stuffing more & more lumber in the wall, walls framed with 2x4s on 24" centers will support nearly any sort of roof load you're likely to ever see - especially if you don't live in a far northern climate. I've seen 2nd-floor hot tubs with far less support than that.
You do have to be pretty careful laying out the studs; 1-1/2" isn't a huge surface to stitch two piece of OSB together on, so if one end of a stud is kicked to the side only 1/2", all you have left for one of those OSB sheets is a scant 1/4" of nailing surface.
For roof sheathing, you might want to go a little heavier, though. I've built two matching roofs using only 1/2" sheathing (this was in Albuquerque), and it was really pretty uncomfortable to walk on such a flimsy roof. Come to think of it, the trusses in those roofs were 24" oc, which was fine for that climate. It was really hard to drive roofing nails into, because the sheathing flexed so much.
Best Answer
Your hunch is correct - the anchor bolt in the picture obviously isn't doing a whole lot. If the scabbed on 2x4 bothers you, just remove it, cut the existing anchor bolt off flush with the concrete, and put in a new anchor through the center of the base plate.