You can do this in Photoshop with custom brush you need to define (rectangle shape) and then play with the settings (remember that “roundness” in this case will be thickness of the shape. This is what you could get.
In illustrator the easiest way (for me) would be do create few different patterns, fill objects with them, then expand and multiply and move them. The effect would look like this
Create the object you will later use as a pattern. Select them and then move to swatches
Then, make object you would like to fill and from “fill” list choose your pattern.
When object if filled choose Object –> Expand tick “fill” and will be able to move and overlap objects. Do is as many times as you want until you will be happy with results.
Using Direct Select Tool you can move single rectangles co you can add more random effect.
The main advantage of illustrator is that you can add single rectangles to make the scatter look more random.