It's a bad idea... Looks like they wanted to tie the top of the wall back into the diaphragm - but it only works in one direction...
Or, they wanted to pull vert load off the 1st joist and push it into the wall and 2nd joist, weird...
If there was just one or two, I'd assume this was a quick...