Why use both big polarized cap and small non-polarized cap in the TB6612FNG DC motor controller terminal?
The two capacitors complement each others’ strengths and weaknesses. 

Large electrolytic capacitors work better at lower frequency than they do at high. This is due to their internal resistance, referred to as Equivalent Series Resistance, or ESR. They also have relatively high series inductance, or ESL. Both of these limit the electrolytic capacitors’ ability to filter high frequency.

Ceramic caps don’t have the high storage capacity of electrolytic. They also have an issue called bias effect, where their value diminishes as the working voltage increases. But they do have something that electrolytics don’t: very low ESR and ESL, making them much more effective at high frequency.

Used together the two capacitor types can cover a wider range of frequencies, and thus, do a better job of filtering noise.

However... Anti-Resonance Is A Thing. Mix Values With Care

Different value capacitors can interact in unexpected ways that can lead to peaks and valleys in the overall response, in some cases leading to worse performance than if you’d only stuck with one value. This phenomenon is called anti-resonance, and it needs to be considered when mixing cap values to improve frequency response.

In the diagram shown, the use of the two types is kind of a ‘Hail Mary’ - the designer has placed them without really analyzing about how the caps interact with each other.

As it so happens, 10uF and 0.1uF together have an anti-resonance peak at about 3.6MHz of over 3 ohms (per KSIM below.) If you had, say a switching regulator that worked at 600kHz, its sixth harmonic would be right in the middle of that peak and thus not be well-filtered. Not what you want.

To overcome this problem I would increase the ceramic to 1uF or even 2.2uF, or maybe chuck the whole thing and start over using an all MLCC design.

Some Online Resources For Capacitor Selection

Kemet has an online tool called KSIM that allows you to experiment with different values and combinations of values to identify these issues. Link: http://ksim.kemet.com/

Murata has a tool called SimSurfing that allows you to view different capacitance characteristics. Unfortunately they don't support combining impedances like KSIM, but it's still useful. Link: https://www.murata.com/en-us/tool/simsurfing

Murata also has this very useful appnote about bypassing caps: https://www.murata.com/~/media/webrenewal/support/library/catalog/products/emc/emifil/c39e.ashx